Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -567,15 +567,8 @@ static int decode_usac_scale_factors(AACDecContext *ac, · 566 unmodified lines | ||
| 567 | 567 | int offset_sf = global_gain; |
| 568 | 568 | for (int g = 0; g < ics->num_window_groups; g++) { |
| 569 | 569 | for (int sfb = 0; sfb < ics->max_sfb; sfb++) { |
| 570 | − /* First coefficient is just the global gain */ | |
| 571 | − if (!g && !sfb) { | |
| 572 | − /* The cannonical representation of quantized scalefactors | |
| 573 | − * in the spec is with 100 subtracted. */ | |
| 574 | − sce->sfo[0] = offset_sf - 100; | |
| 575 | − continue; | |
| 576 | − } | |
| 577 | − | |
| 578 | − offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; | |
| 570 | + if (g || sfb) | |
| 571 | + offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; | |
| 579 | 572 | if (offset_sf > 255U) { |
| 580 | 573 | av_log(ac->avctx, AV_LOG_ERROR, |
| 581 | 574 | "Scalefactor (%d) out of range.\n", offset_sf); |