libavcodec/aacpsy.c:684: error: Uninitialized Value
  The value read from reduction was never initialized.

libavcodec/aacpsy.c:684:37: 
682. 
683.                     if (active_lines > 0.0f)
684.                         band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);
                                         ^
685.                     pe += calc_pe_3gpp(band);
686.                     band->norm_fac = band->active_lines / band->thr;

static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
                             const float *coefs, const FFPsyWindowInfo *wi)
{
    AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
    AacPsyChannel *pch  = &pctx->ch[channel];
    int start = 0;
    int i, w, g;
    float desired_bits, desired_pe, delta_pe, reduction, spread_en[128] = {0};
    float a = 0.0f, active_lines = 0.0f, norm_fac = 0.0f;
    float pe = pctx->chan_bitrate > 32000 ? 0.0f : FFMAX(50.0f, 100.0f - pctx->chan_bitrate * 100.0f / 32000.0f);
    const int      num_bands   = ctx->num_bands[wi->num_windows == 8];
    const uint8_t *band_sizes  = ctx->bands[wi->num_windows == 8];
    AacPsyCoeffs  *coeffs      = pctx->psy_coef[wi->num_windows == 8];
    const float avoid_hole_thr = wi->num_windows == 8 ? PSY_3GPP_AH_THR_SHORT : PSY_3GPP_AH_THR_LONG;
    for (w = 0; w < wi->num_windows*16; w += 16) {
        for (g = 0; g < num_bands; g++) {
            AacPsyBand *band = &pch->band[w+g];
            float form_factor = 0.0f;
            band->energy = 0.0f;
            for (i = 0; i < band_sizes[g]; i++) {
                band->energy += coefs[start+i] * coefs[start+i];
                form_factor  += sqrtf(fabs(coefs[start+i]));
            }
            band->thr      = band->energy * 0.001258925f;
            band->nz_lines = form_factor / powf(band->energy / band_sizes[g], 0.25f);
            start += band_sizes[g];
        }
    }
    for (w = 0; w < wi->num_windows*16; w += 16) {
        AacPsyBand *bands = &pch->band[w];
        spread_en[0] = bands[0].energy;
        for (g = 1; g < num_bands; g++) {
            bands[g].thr   = FFMAX(bands[g].thr,    bands[g-1].thr * coeffs[g].spread_hi[0]);
            spread_en[w+g] = FFMAX(bands[g].energy, spread_en[w+g-1] * coeffs[g].spread_hi[1]);
        }
        for (g = num_bands - 2; g >= 0; g--) {
            bands[g].thr   = FFMAX(bands[g].thr,   bands[g+1].thr * coeffs[g].spread_low[0]);
            spread_en[w+g] = FFMAX(spread_en[w+g], spread_en[w+g+1] * coeffs[g].spread_low[1]);
        }
        for (g = 0; g < num_bands; g++) {
            AacPsyBand *band = &bands[g];
            band->thr_quiet = band->thr = FFMAX(band->thr, coeffs[g].ath);
            if (!(wi->window_type[0] == LONG_STOP_SEQUENCE || (wi->window_type[1] == LONG_START_SEQUENCE && !w)))
                band->thr = FFMAX(PSY_3GPP_RPEMIN*band->thr, FFMIN(band->thr,
                                  PSY_3GPP_RPELEV*pch->prev_band[w+g].thr_quiet));
            pe += calc_pe_3gpp(band);
            a  += band->pe_const;
            active_lines += band->active_lines;
            if (spread_en[w+g] * avoid_hole_thr > band->energy || coeffs[g].min_snr > 1.0f)
                band->avoid_holes = PSY_3GPP_AH_NONE;
            else
                band->avoid_holes = PSY_3GPP_AH_INACTIVE;
        }
    }
    ctx->pe[channel] = pe;
    desired_bits = calc_bit_demand(pctx, pe, ctx->bitres.bits, ctx->bitres.size, wi->num_windows == 8);
    desired_pe = PSY_3GPP_BITS_TO_PE(desired_bits);
    if (ctx->bitres.bits > 0)
        desired_pe *= av_clipf(pctx->pe.previous / PSY_3GPP_BITS_TO_PE(ctx->bitres.bits),
                               0.85f, 1.15f);
    pctx->pe.previous = PSY_3GPP_BITS_TO_PE(desired_bits);
    if (desired_pe < pe) {
        for (w = 0; w < wi->num_windows*16; w += 16) {
            reduction = calc_reduction_3gpp(a, desired_pe, pe, active_lines);
            pe = 0.0f;
            a  = 0.0f;
            active_lines = 0.0f;
            for (g = 0; g < num_bands; g++) {
                AacPsyBand *band = &pch->band[w+g];
                band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);
                pe += calc_pe_3gpp(band);
                a  += band->pe_const;
                active_lines += band->active_lines;
            }
        }
        for (i = 0; i < 2; i++) {
            float pe_no_ah = 0.0f, desired_pe_no_ah;
            active_lines = a = 0.0f;
            for (w = 0; w < wi->num_windows*16; w += 16) {
                for (g = 0; g < num_bands; g++) {
                    AacPsyBand *band = &pch->band[w+g];
                    if (band->avoid_holes != PSY_3GPP_AH_ACTIVE) {
                        pe_no_ah += band->pe;
                        a        += band->pe_const;
                        active_lines += band->active_lines;
                    }
                }
            }
            desired_pe_no_ah = FFMAX(desired_pe - (pe - pe_no_ah), 0.0f);
            if (active_lines > 0.0f)
                reduction += calc_reduction_3gpp(a, desired_pe_no_ah, pe_no_ah, active_lines);
            pe = 0.0f;
            for (w = 0; w < wi->num_windows*16; w += 16) {
                for (g = 0; g < num_bands; g++) {
                    AacPsyBand *band = &pch->band[w+g];
                    if (active_lines > 0.0f)
                        band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);
                    pe += calc_pe_3gpp(band);
                    band->norm_fac = band->active_lines / band->thr;
                    norm_fac += band->norm_fac;
                }
            }
            delta_pe = desired_pe - pe;
            if (fabs(delta_pe) > 0.05f * desired_pe)
                break;
        }
        if (pe < 1.15f * desired_pe) {
            norm_fac = 1.0f / norm_fac;
            for (w = 0; w < wi->num_windows*16; w += 16) {
                for (g = 0; g < num_bands; g++) {
                    AacPsyBand *band = &pch->band[w+g];
                    if (band->active_lines > 0.5f) {
                        float delta_sfb_pe = band->norm_fac * norm_fac * delta_pe;
                        float thr = band->thr;
                        thr *= powf(2.0f, delta_sfb_pe / band->active_lines);
                        if (thr > coeffs[g].min_snr * band->energy && band->avoid_holes == PSY_3GPP_AH_INACTIVE)
                            thr = FFMAX(band->thr, coeffs[g].min_snr * band->energy);
                        band->thr = thr;
                    }
                }
            }
        } else {
            g = num_bands;
            while (pe > desired_pe && g--) {
                for (w = 0; w < wi->num_windows*16; w+= 16) {
                    AacPsyBand *band = &pch->band[w+g];
                    if (band->avoid_holes != PSY_3GPP_AH_NONE && coeffs[g].min_snr < PSY_SNR_1DB) {
                        coeffs[g].min_snr = PSY_SNR_1DB;
                        band->thr = band->energy * PSY_SNR_1DB;
                        pe += band->active_lines * 1.5f - band->pe;
                    }
                }
            }
        }
    }
    for (w = 0; w < wi->num_windows*16; w += 16) {
        for (g = 0; g < num_bands; g++) {
            AacPsyBand *band     = &pch->band[w+g];
            FFPsyBand  *psy_band = &ctx->psy_bands[channel*PSY_MAX_BANDS+w+g];
            psy_band->threshold = band->thr;
            psy_band->energy    = band->energy;
        }
    }
    memcpy(pch->prev_band, pch->band, sizeof(pch->band));
}
['static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,\n                             const float *coefs, const FFPsyWindowInfo *wi)\n{\n    AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;\n    AacPsyChannel *pch  = &pctx->ch[channel];\n    int start = 0;\n    int i, w, g;\n    float desired_bits, desired_pe, delta_pe, reduction, spread_en[128] = {0};\n    float a = 0.0f, active_lines = 0.0f, norm_fac = 0.0f;\n    float pe = pctx->chan_bitrate > 32000 ? 0.0f : FFMAX(50.0f, 100.0f - pctx->chan_bitrate * 100.0f / 32000.0f);\n    const int      num_bands   = ctx->num_bands[wi->num_windows == 8];\n    const uint8_t *band_sizes  = ctx->bands[wi->num_windows == 8];\n    AacPsyCoeffs  *coeffs      = pctx->psy_coef[wi->num_windows == 8];\n    const float avoid_hole_thr = wi->num_windows == 8 ? PSY_3GPP_AH_THR_SHORT : PSY_3GPP_AH_THR_LONG;\n    for (w = 0; w < wi->num_windows*16; w += 16) {\n        for (g = 0; g < num_bands; g++) {\n            AacPsyBand *band = &pch->band[w+g];\n            float form_factor = 0.0f;\n            band->energy = 0.0f;\n            for (i = 0; i < band_sizes[g]; i++) {\n                band->energy += coefs[start+i] * coefs[start+i];\n                form_factor  += sqrtf(fabs(coefs[start+i]));\n            }\n            band->thr      = band->energy * 0.001258925f;\n            band->nz_lines = form_factor / powf(band->energy / band_sizes[g], 0.25f);\n            start += band_sizes[g];\n        }\n    }\n    for (w = 0; w < wi->num_windows*16; w += 16) {\n        AacPsyBand *bands = &pch->band[w];\n        spread_en[0] = bands[0].energy;\n        for (g = 1; g < num_bands; g++) {\n            bands[g].thr   = FFMAX(bands[g].thr,    bands[g-1].thr * coeffs[g].spread_hi[0]);\n            spread_en[w+g] = FFMAX(bands[g].energy, spread_en[w+g-1] * coeffs[g].spread_hi[1]);\n        }\n        for (g = num_bands - 2; g >= 0; g--) {\n            bands[g].thr   = FFMAX(bands[g].thr,   bands[g+1].thr * coeffs[g].spread_low[0]);\n            spread_en[w+g] = FFMAX(spread_en[w+g], spread_en[w+g+1] * coeffs[g].spread_low[1]);\n        }\n        for (g = 0; g < num_bands; g++) {\n            AacPsyBand *band = &bands[g];\n            band->thr_quiet = band->thr = FFMAX(band->thr, coeffs[g].ath);\n            if (!(wi->window_type[0] == LONG_STOP_SEQUENCE || (wi->window_type[1] == LONG_START_SEQUENCE && !w)))\n                band->thr = FFMAX(PSY_3GPP_RPEMIN*band->thr, FFMIN(band->thr,\n                                  PSY_3GPP_RPELEV*pch->prev_band[w+g].thr_quiet));\n            pe += calc_pe_3gpp(band);\n            a  += band->pe_const;\n            active_lines += band->active_lines;\n            if (spread_en[w+g] * avoid_hole_thr > band->energy || coeffs[g].min_snr > 1.0f)\n                band->avoid_holes = PSY_3GPP_AH_NONE;\n            else\n                band->avoid_holes = PSY_3GPP_AH_INACTIVE;\n        }\n    }\n    ctx->pe[channel] = pe;\n    desired_bits = calc_bit_demand(pctx, pe, ctx->bitres.bits, ctx->bitres.size, wi->num_windows == 8);\n    desired_pe = PSY_3GPP_BITS_TO_PE(desired_bits);\n    if (ctx->bitres.bits > 0)\n        desired_pe *= av_clipf(pctx->pe.previous / PSY_3GPP_BITS_TO_PE(ctx->bitres.bits),\n                               0.85f, 1.15f);\n    pctx->pe.previous = PSY_3GPP_BITS_TO_PE(desired_bits);\n    if (desired_pe < pe) {\n        for (w = 0; w < wi->num_windows*16; w += 16) {\n            reduction = calc_reduction_3gpp(a, desired_pe, pe, active_lines);\n            pe = 0.0f;\n            a  = 0.0f;\n            active_lines = 0.0f;\n            for (g = 0; g < num_bands; g++) {\n                AacPsyBand *band = &pch->band[w+g];\n                band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);\n                pe += calc_pe_3gpp(band);\n                a  += band->pe_const;\n                active_lines += band->active_lines;\n            }\n        }\n        for (i = 0; i < 2; i++) {\n            float pe_no_ah = 0.0f, desired_pe_no_ah;\n            active_lines = a = 0.0f;\n            for (w = 0; w < wi->num_windows*16; w += 16) {\n                for (g = 0; g < num_bands; g++) {\n                    AacPsyBand *band = &pch->band[w+g];\n                    if (band->avoid_holes != PSY_3GPP_AH_ACTIVE) {\n                        pe_no_ah += band->pe;\n                        a        += band->pe_const;\n                        active_lines += band->active_lines;\n                    }\n                }\n            }\n            desired_pe_no_ah = FFMAX(desired_pe - (pe - pe_no_ah), 0.0f);\n            if (active_lines > 0.0f)\n                reduction += calc_reduction_3gpp(a, desired_pe_no_ah, pe_no_ah, active_lines);\n            pe = 0.0f;\n            for (w = 0; w < wi->num_windows*16; w += 16) {\n                for (g = 0; g < num_bands; g++) {\n                    AacPsyBand *band = &pch->band[w+g];\n                    if (active_lines > 0.0f)\n                        band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);\n                    pe += calc_pe_3gpp(band);\n                    band->norm_fac = band->active_lines / band->thr;\n                    norm_fac += band->norm_fac;\n                }\n            }\n            delta_pe = desired_pe - pe;\n            if (fabs(delta_pe) > 0.05f * desired_pe)\n                break;\n        }\n        if (pe < 1.15f * desired_pe) {\n            norm_fac = 1.0f / norm_fac;\n            for (w = 0; w < wi->num_windows*16; w += 16) {\n                for (g = 0; g < num_bands; g++) {\n                    AacPsyBand *band = &pch->band[w+g];\n                    if (band->active_lines > 0.5f) {\n                        float delta_sfb_pe = band->norm_fac * norm_fac * delta_pe;\n                        float thr = band->thr;\n                        thr *= powf(2.0f, delta_sfb_pe / band->active_lines);\n                        if (thr > coeffs[g].min_snr * band->energy && band->avoid_holes == PSY_3GPP_AH_INACTIVE)\n                            thr = FFMAX(band->thr, coeffs[g].min_snr * band->energy);\n                        band->thr = thr;\n                    }\n                }\n            }\n        } else {\n            g = num_bands;\n            while (pe > desired_pe && g--) {\n                for (w = 0; w < wi->num_windows*16; w+= 16) {\n                    AacPsyBand *band = &pch->band[w+g];\n                    if (band->avoid_holes != PSY_3GPP_AH_NONE && coeffs[g].min_snr < PSY_SNR_1DB) {\n                        coeffs[g].min_snr = PSY_SNR_1DB;\n                        band->thr = band->energy * PSY_SNR_1DB;\n                        pe += band->active_lines * 1.5f - band->pe;\n                    }\n                }\n            }\n        }\n    }\n    for (w = 0; w < wi->num_windows*16; w += 16) {\n        for (g = 0; g < num_bands; g++) {\n            AacPsyBand *band     = &pch->band[w+g];\n            FFPsyBand  *psy_band = &ctx->psy_bands[channel*PSY_MAX_BANDS+w+g];\n            psy_band->threshold = band->thr;\n            psy_band->energy    = band->energy;\n        }\n    }\n    memcpy(pch->prev_band, pch->band, sizeof(pch->band));\n}']