Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/aac/aacdec_usac.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 2938e693874..ccdf58bc8e2 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -567,15 +567,8 @@ static int decode_usac_scale_factors(AACDecContext *ac,
int offset_sf = global_gain;
for (int g = 0; g < ics->num_window_groups; g++) {
for (int sfb = 0; sfb < ics->max_sfb; sfb++) {
- /* First coefficient is just the global gain */
- if (!g && !sfb) {
- /* The cannonical representation of quantized scalefactors
- * in the spec is with 100 subtracted. */
- sce->sfo[0] = offset_sf - 100;
- continue;
- }
-
- offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) -
SCALE_DIFF_ZERO;
+ if (g || sfb)
+ offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) -
SCALE_DIFF_ZERO;
if (offset_sf > 255U) {
av_log(ac->avctx, AV_LOG_ERROR,
"Scalefactor (%d) out of range.\n", offset_sf);
--
2.48.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".