You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/aac/aacdec_usac: Simplify decode_usac_scale_factors()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -567,14 +567,7 @@ static int decode_usac_scale_factors(AACDecContext *ac,
|
|||||||
int offset_sf = global_gain;
|
int offset_sf = global_gain;
|
||||||
for (int g = 0; g < ics->num_window_groups; g++) {
|
for (int g = 0; g < ics->num_window_groups; g++) {
|
||||||
for (int sfb = 0; sfb < ics->max_sfb; sfb++) {
|
for (int sfb = 0; sfb < ics->max_sfb; sfb++) {
|
||||||
/* First coefficient is just the global gain */
|
if (g || sfb)
|
||||||
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;
|
offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO;
|
||||||
if (offset_sf > 255U) {
|
if (offset_sf > 255U) {
|
||||||
av_log(ac->avctx, AV_LOG_ERROR,
|
av_log(ac->avctx, AV_LOG_ERROR,
|
||||||
|
Reference in New Issue
Block a user