Revision cda00def

View differences:

libavcodec/aacenc.c
264 264
/**
265 265
 * Encode pulse data.
266 266
 */
267
static void encode_pulses(AACEncContext *s, Pulse *pulse, int channel)
267
static void encode_pulses(AACEncContext *s, Pulse *pulse)
268 268
{
269 269
    int i;
270 270

  
......
282 282
/**
283 283
 * Encode spectral coefficients processed by psychoacoustic model.
284 284
 */
285
static void encode_spectral_coeffs(AACEncContext *s, ChannelElement *cpe, int channel)
285
static void encode_spectral_coeffs(AACEncContext *s, SingleChannelElement *sce)
286 286
{
287 287
    int start, i, w, w2, wg;
288 288

  
289 289
    w = 0;
290
    for(wg = 0; wg < cpe->ch[channel].ics.num_window_groups; wg++){
290
    for(wg = 0; wg < sce->ics.num_window_groups; wg++){
291 291
        start = 0;
292
        for(i = 0; i < cpe->ch[channel].ics.max_sfb; i++){
293
            if(cpe->ch[channel].zeroes[w*16 + i]){
294
                start += cpe->ch[channel].ics.swb_sizes[i];
292
        for(i = 0; i < sce->ics.max_sfb; i++){
293
            if(sce->zeroes[w*16 + i]){
294
                start += sce->ics.swb_sizes[i];
295 295
                continue;
296 296
            }
297
            for(w2 = w; w2 < w + cpe->ch[channel].ics.group_len[wg]; w2++){
297
            for(w2 = w; w2 < w + sce->ics.group_len[wg]; w2++){
298 298
                encode_band_coeffs(s, cpe, channel, start + w2*128,
299
                                   cpe->ch[channel].ics.swb_sizes[i],
300
                                   cpe->ch[channel].band_type[w*16 + i]);
299
                                   sce->ics.swb_sizes[i],
300
                                   sce->band_type[w*16 + i]);
301 301
            }
302
            start += cpe->ch[channel].ics.swb_sizes[i];
302
            start += sce->ics.swb_sizes[i];
303 303
        }
304
        w += cpe->ch[channel].ics.group_len[wg];
304
        w += sce->ics.group_len[wg];
305 305
    }
306 306
}
307 307

  

Also available in: Unified diff