Revision 695f39c8

View differences:

libavcodec/aacdec.c
1386 1386
 *                      [1] mask is decoded from bitstream; [2] mask is all 1s;
1387 1387
 *                      [3] reserved for scalable AAC
1388 1388
 */
1389
static void apply_intensity_stereo(ChannelElement *cpe, int ms_present)
1389
static void apply_intensity_stereo(AACContext *ac, ChannelElement *cpe, int ms_present)
1390 1390
{
1391 1391
    const IndividualChannelStream *ics = &cpe->ch[1].ics;
1392 1392
    SingleChannelElement         *sce1 = &cpe->ch[1];
1393 1393
    float *coef0 = cpe->ch[0].coeffs, *coef1 = cpe->ch[1].coeffs;
1394 1394
    const uint16_t *offsets = ics->swb_offset;
1395
    int g, group, i, k, idx = 0;
1395
    int g, group, i, idx = 0;
1396 1396
    int c;
1397 1397
    float scale;
1398 1398
    for (g = 0; g < ics->num_window_groups; g++) {
......
1405 1405
                        c *= 1 - 2 * cpe->ms_mask[idx];
1406 1406
                    scale = c * sce1->sf[idx];
1407 1407
                    for (group = 0; group < ics->group_len[g]; group++)
1408
                        for (k = offsets[i]; k < offsets[i + 1]; k++)
1409
                            coef1[group * 128 + k] = scale * coef0[group * 128 + k];
1408
                        ac->dsp.vector_fmul_scalar(coef1 + group * 128 + offsets[i],
1409
                                                   coef0 + group * 128 + offsets[i],
1410
                                                   scale,
1411
                                                   offsets[i + 1] - offsets[i]);
1410 1412
                }
1411 1413
            } else {
1412 1414
                int bt_run_end = sce1->band_type_run_end[idx];
......
1459 1461
        }
1460 1462
    }
1461 1463

  
1462
    apply_intensity_stereo(cpe, ms_present);
1464
    apply_intensity_stereo(ac, cpe, ms_present);
1463 1465
    return 0;
1464 1466
}
1465 1467

  

Also available in: Unified diff