Revision 8fbb368d libavcodec/ac3dec.c

View differences:

libavcodec/ac3dec.c
76 76

  
77 77
static const float slevs[4] = { LEVEL_MINUS_3DB, LEVEL_MINUS_6DB, LEVEL_ZERO, LEVEL_MINUS_6DB };
78 78

  
79
#define BLOCK_SIZE    256
80

  
81 79
#define AC3_OUTPUT_LFEON  8
82 80

  
83 81
typedef struct {
......
145 143
    uint8_t  bap[5][256];       //fbw channel bit allocation pointers
146 144
    uint8_t  lfebap[256];       //lfe channel bit allocation pointers
147 145

  
148
    DECLARE_ALIGNED_16(float, transform_coeffs[AC3_MAX_CHANNELS][BLOCK_SIZE]);  //transform coefficients
146
    DECLARE_ALIGNED_16(float, transform_coeffs[AC3_MAX_CHANNELS][256]);  //transform coefficients
149 147

  
150 148
    /* For IMDCT. */
151 149
    MDCTContext imdct_512;  //for 512 sample imdct transform
152 150
    MDCTContext imdct_256;  //for 256 sample imdct transform
153 151
    DSPContext  dsp;        //for optimization
154 152

  
155
    DECLARE_ALIGNED_16(float, output[AC3_MAX_CHANNELS][BLOCK_SIZE]);    //output after imdct transform and windowing
156
    DECLARE_ALIGNED_16(float, delay[AC3_MAX_CHANNELS][BLOCK_SIZE]);     //delay - added to the next block
157
    DECLARE_ALIGNED_16(float, tmp_imdct[BLOCK_SIZE]);               //temporary storage for imdct transform
158
    DECLARE_ALIGNED_16(float, tmp_output[BLOCK_SIZE * 2]);          //temporary storage for output before windowing
159
    DECLARE_ALIGNED_16(float, window[BLOCK_SIZE]);                  //window coefficients
153
    DECLARE_ALIGNED_16(float, output[AC3_MAX_CHANNELS][256]);   //output after imdct transform and windowing
154
    DECLARE_ALIGNED_16(float, delay[AC3_MAX_CHANNELS][256]);    //delay - added to the next block
155
    DECLARE_ALIGNED_16(float, tmp_imdct[256]);                  //temporary storage for imdct transform
156
    DECLARE_ALIGNED_16(float, tmp_output[512]);                 //temporary storage for output before windowing
157
    DECLARE_ALIGNED_16(float, window[256]);                     //window coefficients
160 158

  
161 159
    /* Miscellaneous. */
162 160
    GetBitContext gb;
......
1122 1120
            return ctx->frame_size;
1123 1121
        }
1124 1122
        start = (ctx->output_mode & AC3_OUTPUT_LFEON) ? 0 : 1;
1125
        for (k = 0; k < BLOCK_SIZE; k++)
1123
        for (k = 0; k < 256; k++)
1126 1124
            for (j = start; j <= ctx->nfchans; j++)
1127 1125
                *(out_samples++) = convert(int_ptr[j][k]);
1128 1126
    }
1129
    *data_size = NB_BLOCKS * BLOCK_SIZE * avctx->channels * sizeof (int16_t);
1127
    *data_size = NB_BLOCKS * 256 * avctx->channels * sizeof (int16_t);
1130 1128
    return ctx->frame_size;
1131 1129
}
1132 1130

  

Also available in: Unified diff