Revision e7a6d5f3 libavcodec/wmadec.c

View differences:

libavcodec/wmadec.c
115 115
    float max_exponent[MAX_CHANNELS];
116 116
    int16_t coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
117 117
    DECLARE_ALIGNED_16(float, coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]);
118
    DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
119
    DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]);
118 120
    MDCTContext mdct_ctx[BLOCK_NB_SIZES];
119 121
    float *windows[BLOCK_NB_SIZES];
120 122
    DECLARE_ALIGNED_16(FFTSample, mdct_tmp[BLOCK_MAX_SIZE]); /* temporary storage for imdct */
......
717 719
{
718 720
    int n, v, a, ch, code, bsize;
719 721
    int coef_nb_bits, total_gain, parse_exponents;
720
    DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]);
721 722
    int nb_coefs[MAX_CHANNELS];
722 723
    float mdct_norm;
723 724

  
......
1072 1073
        next_block_len = 1 << s->next_block_len_bits;
1073 1074

  
1074 1075
        /* right part */
1075
        wptr = window + block_len;
1076
        wptr = s->window + block_len;
1076 1077
        if (block_len <= next_block_len) {
1077 1078
            for(i=0;i<block_len;i++)
1078 1079
                *wptr++ = s->windows[bsize][i];
......
1088 1089
        }
1089 1090

  
1090 1091
        /* left part */
1091
        wptr = window + block_len;
1092
        wptr = s->window + block_len;
1092 1093
        if (block_len <= prev_block_len) {
1093 1094
            for(i=0;i<block_len;i++)
1094 1095
                *--wptr = s->windows[bsize][i];
......
1107 1108

  
1108 1109
    for(ch = 0; ch < s->nb_channels; ch++) {
1109 1110
        if (s->channel_coded[ch]) {
1110
            DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
1111 1111
            float *ptr;
1112 1112
            int n4, index, n;
1113 1113

  
1114 1114
            n = s->block_len;
1115 1115
            n4 = s->block_len / 2;
1116 1116
            s->mdct_ctx[bsize].fft.imdct_calc(&s->mdct_ctx[bsize],
1117
                          output, s->coefs[ch], s->mdct_tmp);
1117
                          s->output, s->coefs[ch], s->mdct_tmp);
1118 1118

  
1119 1119
            /* XXX: optimize all that by build the window and
1120 1120
               multipying/adding at the same time */
......
1122 1122
            /* multiply by the window and add in the frame */
1123 1123
            index = (s->frame_len / 2) + s->block_pos - n4;
1124 1124
            ptr = &s->frame_out[ch][index];
1125
            s->dsp.vector_fmul_add_add(ptr,window,output,ptr,0,2*n,1);
1125
            s->dsp.vector_fmul_add_add(ptr,s->window,s->output,ptr,0,2*n,1);
1126 1126

  
1127 1127
            /* specific fast case for ms-stereo : add to second
1128 1128
               channel if it is not coded */
1129 1129
            if (s->ms_stereo && !s->channel_coded[1]) {
1130 1130
                ptr = &s->frame_out[1][index];
1131
                s->dsp.vector_fmul_add_add(ptr,window,output,ptr,0,2*n,1);
1131
                s->dsp.vector_fmul_add_add(ptr,s->window,s->output,ptr,0,2*n,1);
1132 1132
            }
1133 1133
        }
1134 1134
    }

Also available in: Unified diff