Revision af2ee6fc

View differences:

libavcodec/aaccoder.c
579 579

  
580 580
                    for (i = 0; i < q1 - q0; i++) {
581 581
                        float cost;
582
                        if (isinf(paths[idx - 1][i].cost))
583
                            continue;
584 582
                        cost = paths[idx - 1][i].cost + dist
585 583
                               + ff_aac_scalefactor_bits[q - i + SCALE_DIFF_ZERO];
586 584
                        if (cost < paths[idx][q].cost) {
......
591 589
                }
592 590
            } else {
593 591
                for (q = 0; q < q1 - q0; q++) {
594
                    if (!isinf(paths[idx - 1][q].cost)) {
595 592
                        paths[idx][q].cost = paths[idx - 1][q].cost + 1;
596 593
                        paths[idx][q].prev = q;
597
                        continue;
598
                    }
599
                    for (i = 0; i < q1 - q0; i++) {
600
                        float cost;
601
                        if (isinf(paths[idx - 1][i].cost))
602
                            continue;
603
                        cost = paths[idx - 1][i].cost + ff_aac_scalefactor_bits[q - i + SCALE_DIFF_ZERO];
604
                        if (cost < paths[idx][q].cost) {
605
                            paths[idx][q].cost    = cost;
606
                            paths[idx][q].prev    = i;
607
                        }
608
                    }
609 594
                }
610 595
            }
611 596
            sce->zeroes[w*16+g] = !nz;

Also available in: Unified diff