History

avcodec/aac/aacdec_usac: Simplify decode_usac_scale_factors()

Michael Niedermayer committed 1 year ago

Commit 41cd72d1 parent d1be3691 file · +2 −9Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/aac/aacdec_usac.c+2−9
@@ -567,15 +567,8 @@ static int decode_usac_scale_factors(AACDecContext *ac, · 566 unmodified lines
567 int offset_sf = global_gain;567 int offset_sf = global_gain;
568 for (int g = 0; g < ics->num_window_groups; g++) {568 for (int g = 0; g < ics->num_window_groups; g++) {
569 for (int sfb = 0; sfb < ics->max_sfb; sfb++) {569 for (int sfb = 0; sfb < ics->max_sfb; sfb++) {
570 /* First coefficient is just the global gain */570 if (g || sfb)
571 if (!g && !sfb) {571 offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO;
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;
579 if (offset_sf > 255U) {572 if (offset_sf > 255U) {
580 av_log(ac->avctx, AV_LOG_ERROR,573 av_log(ac->avctx, AV_LOG_ERROR,
581 "Scalefactor (%d) out of range.\n", offset_sf);574 "Scalefactor (%d) out of range.\n", offset_sf);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t