Ticket #2686: aac-improvements-wip-v8-fix.patch

File aac-improvements-wip-v8-fix.patch, 1.8 KB (added by klaussfreire, 12 years ago)

Cumulative patch over v8 to fix M/S coding

  • libavcodec/aaccoder.c

    a b  
    14561456                        continue;
    14571457                    }
    14581458                   
     1459                    /* No CB can be zero */
     1460                    midcb = FFMAX(1,sce0->band_type[w*16+g]);
     1461                    sidcb = FFMAX(1,sce1->band_type[w*16+g]);
     1462                   
    14591463                    for (w2 = 0; w2 < sce0->ics.group_len[w]; w2++) {
    14601464                        FFPsyBand *band0 = &s->psy.ch[s->cur_channel+0].psy_bands[(w+w2)*16+g];
    14611465                        FFPsyBand *band1 = &s->psy.ch[s->cur_channel+1].psy_bands[(w+w2)*16+g];
     
    14751479                                                    L34,
    14761480                                                    sce0->ics.swb_sizes[g],
    14771481                                                    sce0->sf_idx[(w+w2)*16+g],
    1478                                                     sce0->band_type[(w+w2)*16+g],
     1482                                                    sce0->band_type[w*16+g],
    14791483                                                    lambda / band0->threshold, INFINITY, &b1, 0);
    14801484                        dist1 += quantize_band_cost(s, sce1->coeffs + start + w2*128,
    14811485                                                    R34,
    14821486                                                    sce1->ics.swb_sizes[g],
    14831487                                                    sce1->sf_idx[(w+w2)*16+g],
    1484                                                     sce1->band_type[(w+w2)*16+g],
     1488                                                    sce1->band_type[w*16+g],
    14851489                                                    lambda / band1->threshold, INFINITY, &b2, 0);
    14861490                        dist2 += quantize_band_cost(s, M,
    14871491                                                    M34,