Revision d63f6fea libavcodec/ac3dec.c

View differences:

libavcodec/ac3dec.c
495 495
            case 0:
496 496
                if (!dithflag) {
497 497
                    coeffs[i] = 0;
498
                    continue;
499 498
                }
500 499
                else {
501
                    coeffs[i] = (av_random(&ctx->dith_state) & 0xFFFF) * scale_factors[exps[i]];
502
                    coeffs[i] *= LEVEL_MINUS_3DB;
503
                    continue;
500
                    coeffs[i] = (av_random(&ctx->dith_state) & 0xFFFF) * LEVEL_MINUS_3DB;
504 501
                }
502
                break;
505 503

  
506 504
            case 1:
507 505
                if (m->l3ptr > 2) {
......
511 509
                    m->l3_quantizers[2] = l3_quantizers_3[gcode];
512 510
                    m->l3ptr = 0;
513 511
                }
514
                coeffs[i] = m->l3_quantizers[m->l3ptr++] * scale_factors[exps[i]];
515
                continue;
512
                coeffs[i] = m->l3_quantizers[m->l3ptr++];
513
                break;
516 514

  
517 515
            case 2:
518 516
                if (m->l5ptr > 2) {
......
522 520
                    m->l5_quantizers[2] = l5_quantizers_3[gcode];
523 521
                    m->l5ptr = 0;
524 522
                }
525
                coeffs[i] = m->l5_quantizers[m->l5ptr++] * scale_factors[exps[i]];
526
                continue;
523
                coeffs[i] = m->l5_quantizers[m->l5ptr++];
524
                break;
527 525

  
528 526
            case 3:
529
                coeffs[i] = l7_quantizers[get_bits(gb, 3)] * scale_factors[exps[i]];
530
                continue;
527
                coeffs[i] = l7_quantizers[get_bits(gb, 3)];
528
                break;
531 529

  
532 530
            case 4:
533 531
                if (m->l11ptr > 1) {
......
536 534
                    m->l11_quantizers[1] = l11_quantizers_2[gcode];
537 535
                    m->l11ptr = 0;
538 536
                }
539
                coeffs[i] = m->l11_quantizers[m->l11ptr++] * scale_factors[exps[i]];
540
                continue;
537
                coeffs[i] = m->l11_quantizers[m->l11ptr++];
538
                break;
541 539

  
542 540
            case 5:
543
                coeffs[i] = l15_quantizers[get_bits(gb, 4)] * scale_factors[exps[i]];
544
                continue;
541
                coeffs[i] = l15_quantizers[get_bits(gb, 4)];
542
                break;
545 543

  
546 544
            default:
547
                coeffs[i] = (get_sbits(gb, qntztab[tbap]) << (16 - qntztab[tbap])) * scale_factors[exps[i]];
548
                continue;
545
                coeffs[i] = get_sbits(gb, qntztab[tbap]) << (16 - qntztab[tbap]);
546
                break;
549 547
        }
548
        coeffs[i] *= scale_factors[exps[i]];
550 549
    }
551 550

  
552 551
    return 0;

Also available in: Unified diff