libavcodec/opus_celt.c:786: error: Uninitialized Value
  The value read from trim_offset[_] was never initialized.

libavcodec/opus_celt.c:786:24: 
784.             bits1[i] = FFMAX(0, bits1[i] + trim_offset[i]);
785.         if (bits2[i])
786.             bits2[i] = FFMAX(0, bits2[i] + trim_offset[i]);
                            ^
787.         if (low)
788.             bits1[i] += boost[i];

static void celt_decode_allocation(CeltContext *s, OpusRangeCoder *rc)
{
    int cap[CELT_MAX_BANDS];
    int boost[CELT_MAX_BANDS];
    int threshold[CELT_MAX_BANDS];
    int bits1[CELT_MAX_BANDS];
    int bits2[CELT_MAX_BANDS];
    int trim_offset[CELT_MAX_BANDS];
    int skip_startband = s->startband;
    int dynalloc       = 6;
    int alloctrim      = 5;
    int extrabits      = 0;
    int skip_bit            = 0;
    int intensitystereo_bit = 0;
    int dualstereo_bit      = 0;
    int remaining, bandbits;
    int low, high, total, done;
    int totalbits;
    int consumed;
    int i, j;
    consumed = opus_rc_tell(rc);
    s->spread = CELT_SPREAD_NORMAL;
    if (consumed + 4 <= s->framebits)
        s->spread = opus_rc_getsymbol(rc, celt_model_spread);
    for (i = 0; i < CELT_MAX_BANDS; i++) {
        cap[i] = (celt_static_caps[s->duration][s->coded_channels - 1][i] + 64)
                 * celt_freq_range[i] << (s->coded_channels - 1) << s->duration >> 2;
    }
    totalbits = s->framebits << 3;
    consumed = opus_rc_tell_frac(rc);
    for (i = s->startband; i < s->endband; i++) {
        int quanta, band_dynalloc;
        boost[i] = 0;
        quanta = celt_freq_range[i] << (s->coded_channels - 1) << s->duration;
        quanta = FFMIN(quanta << 3, FFMAX(6 << 3, quanta));
        band_dynalloc = dynalloc;
        while (consumed + (band_dynalloc<<3) < totalbits && boost[i] < cap[i]) {
            int add = opus_rc_p2model(rc, band_dynalloc);
            consumed = opus_rc_tell_frac(rc);
            if (!add)
                break;
            boost[i]     += quanta;
            totalbits    -= quanta;
            band_dynalloc = 1;
        }
        if (boost[i])
            dynalloc = FFMAX(2, dynalloc - 1);
    }
    if (consumed + (6 << 3) <= totalbits)
        alloctrim = opus_rc_getsymbol(rc, celt_model_alloc_trim);
    totalbits = (s->framebits << 3) - opus_rc_tell_frac(rc) - 1;
    s->anticollapse_bit = 0;
    if (s->blocks > 1 && s->duration >= 2 &&
        totalbits >= ((s->duration + 2) << 3))
        s->anticollapse_bit = 1 << 3;
    totalbits -= s->anticollapse_bit;
    if (totalbits >= 1 << 3)
        skip_bit = 1 << 3;
    totalbits -= skip_bit;
    if (s->coded_channels == 2) {
        intensitystereo_bit = celt_log2_frac[s->endband - s->startband];
        if (intensitystereo_bit <= totalbits) {
            totalbits -= intensitystereo_bit;
            if (totalbits >= 1 << 3) {
                dualstereo_bit = 1 << 3;
                totalbits -= 1 << 3;
            }
        } else
            intensitystereo_bit = 0;
    }
    for (i = s->startband; i < s->endband; i++) {
        int trim     = alloctrim - 5 - s->duration;
        int band     = celt_freq_range[i] * (s->endband - i - 1);
        int duration = s->duration + 3;
        int scale    = duration + s->coded_channels - 1;
        threshold[i] = FFMAX(3 * celt_freq_range[i] << duration >> 4,
                             s->coded_channels << 3);
        trim_offset[i] = trim * (band << scale) >> 6;
        if (celt_freq_range[i] << s->duration == 1)
            trim_offset[i] -= s->coded_channels << 3;
    }
    low  = 1;
    high = CELT_VECTORS - 1;
    while (low <= high) {
        int center = (low + high) >> 1;
        done = total = 0;
        for (i = s->endband - 1; i >= s->startband; i--) {
            bandbits = celt_freq_range[i] * celt_static_alloc[center][i]
                       << (s->coded_channels - 1) << s->duration >> 2;
            if (bandbits)
                bandbits = FFMAX(0, bandbits + trim_offset[i]);
            bandbits += boost[i];
            if (bandbits >= threshold[i] || done) {
                done = 1;
                total += FFMIN(bandbits, cap[i]);
            } else if (bandbits >= s->coded_channels << 3)
                total += s->coded_channels << 3;
        }
        if (total > totalbits)
            high = center - 1;
        else
            low = center + 1;
    }
    high = low--;
    for (i = s->startband; i < s->endband; i++) {
        bits1[i] = celt_freq_range[i] * celt_static_alloc[low][i]
                   << (s->coded_channels - 1) << s->duration >> 2;
        bits2[i] = high >= CELT_VECTORS ? cap[i] :
                   celt_freq_range[i] * celt_static_alloc[high][i]
                   << (s->coded_channels - 1) << s->duration >> 2;
        if (bits1[i])
            bits1[i] = FFMAX(0, bits1[i] + trim_offset[i]);
        if (bits2[i])
            bits2[i] = FFMAX(0, bits2[i] + trim_offset[i]);
        if (low)
            bits1[i] += boost[i];
        bits2[i] += boost[i];
        if (boost[i])
            skip_startband = i;
        bits2[i] = FFMAX(0, bits2[i] - bits1[i]);
    }
    low  = 0;
    high = 1 << CELT_ALLOC_STEPS;
    for (i = 0; i < CELT_ALLOC_STEPS; i++) {
        int center = (low + high) >> 1;
        done = total = 0;
        for (j = s->endband - 1; j >= s->startband; j--) {
            bandbits = bits1[j] + (center * bits2[j] >> CELT_ALLOC_STEPS);
            if (bandbits >= threshold[j] || done) {
                done = 1;
                total += FFMIN(bandbits, cap[j]);
            } else if (bandbits >= s->coded_channels << 3)
                total += s->coded_channels << 3;
        }
        if (total > totalbits)
            high = center;
        else
            low = center;
    }
    done = total = 0;
    for (i = s->endband - 1; i >= s->startband; i--) {
        bandbits = bits1[i] + (low * bits2[i] >> CELT_ALLOC_STEPS);
        if (bandbits >= threshold[i] || done)
            done = 1;
        else
            bandbits = (bandbits >= s->coded_channels << 3) ?
                       s->coded_channels << 3 : 0;
        bandbits     = FFMIN(bandbits, cap[i]);
        s->pulses[i] = bandbits;
        total      += bandbits;
    }
    for (s->codedbands = s->endband; ; s->codedbands--) {
        int allocation;
        j = s->codedbands - 1;
        if (j == skip_startband) {
            totalbits += skip_bit;
            break;
        }
        remaining   = totalbits - total;
        bandbits    = remaining / (celt_freq_bands[j+1] - celt_freq_bands[s->startband]);
        remaining  -= bandbits  * (celt_freq_bands[j+1] - celt_freq_bands[s->startband]);
        allocation  = s->pulses[j] + bandbits * celt_freq_range[j]
                      + FFMAX(0, remaining - (celt_freq_bands[j] - celt_freq_bands[s->startband]));
        if (allocation >= FFMAX(threshold[j], (s->coded_channels + 1) <<3 )) {
            if (opus_rc_p2model(rc, 1))
                break;
            total      += 1 << 3;
            allocation -= 1 << 3;
        }
        total -= s->pulses[j];
        if (intensitystereo_bit) {
            total -= intensitystereo_bit;
            intensitystereo_bit = celt_log2_frac[j - s->startband];
            total += intensitystereo_bit;
        }
        total += s->pulses[j] = (allocation >= s->coded_channels << 3) ?
                              s->coded_channels << 3 : 0;
    }
    s->intensitystereo = 0;
    s->dualstereo      = 0;
    if (intensitystereo_bit)
        s->intensitystereo = s->startband +
                          opus_rc_unimodel(rc, s->codedbands + 1 - s->startband);
    if (s->intensitystereo <= s->startband)
        totalbits += dualstereo_bit;
    else if (dualstereo_bit)
        s->dualstereo = opus_rc_p2model(rc, 1);
    remaining = totalbits - total;
    bandbits  = remaining / (celt_freq_bands[s->codedbands] - celt_freq_bands[s->startband]);
    remaining -= bandbits * (celt_freq_bands[s->codedbands] - celt_freq_bands[s->startband]);
    for (i = s->startband; i < s->codedbands; i++) {
        int bits = FFMIN(remaining, celt_freq_range[i]);
        s->pulses[i] += bits + bandbits * celt_freq_range[i];
        remaining    -= bits;
    }
    for (i = s->startband; i < s->codedbands; i++) {
        int N = celt_freq_range[i] << s->duration;
        int prev_extra = extrabits;
        s->pulses[i] += extrabits;
        if (N > 1) {
            int dof;
            int temp;
            int offset;
            int fine_bits, max_bits;
            extrabits = FFMAX(0, s->pulses[i] - cap[i]);
            s->pulses[i] -= extrabits;
            dof = N * s->coded_channels
                  + (s->coded_channels == 2 && N > 2 && !s->dualstereo && i < s->intensitystereo);
            temp = dof * (celt_log_freq_range[i] + (s->duration<<3));
            offset = (temp >> 1) - dof * CELT_FINE_OFFSET;
            if (N == 2)
                offset += dof<<1;
            if (s->pulses[i] + offset < 2 * (dof << 3))
                offset += temp >> 2;
            else if (s->pulses[i] + offset < 3 * (dof << 3))
                offset += temp >> 3;
            fine_bits = (s->pulses[i] + offset + (dof << 2)) / (dof << 3);
            max_bits  = FFMIN((s->pulses[i]>>3) >> (s->coded_channels - 1),
                              CELT_MAX_FINE_BITS);
            max_bits  = FFMAX(max_bits, 0);
            s->fine_bits[i] = av_clip(fine_bits, 0, max_bits);
            s->fine_priority[i] = (s->fine_bits[i] * (dof<<3) >= s->pulses[i] + offset);
            s->pulses[i] -= s->fine_bits[i] << (s->coded_channels - 1) << 3;
        } else {
            extrabits = FFMAX(0, s->pulses[i] - (s->coded_channels << 3));
            s->pulses[i] -= extrabits;
            s->fine_bits[i] = 0;
            s->fine_priority[i] = 1;
        }
        if (extrabits > 0) {
            int fineextra = FFMIN(extrabits >> (s->coded_channels + 2),
                                  CELT_MAX_FINE_BITS - s->fine_bits[i]);
            s->fine_bits[i] += fineextra;
            fineextra <<= s->coded_channels + 2;
            s->fine_priority[i] = (fineextra >= extrabits - prev_extra);
            extrabits -= fineextra;
        }
    }
    s->remaining = extrabits;
    for (; i < s->endband; i++) {
        s->fine_bits[i]     = s->pulses[i] >> (s->coded_channels - 1) >> 3;
        s->pulses[i]        = 0;
        s->fine_priority[i] = s->fine_bits[i] < 1;
    }
}
['static void celt_decode_allocation(CeltContext *s, OpusRangeCoder *rc)\n{\n    int cap[CELT_MAX_BANDS];\n    int boost[CELT_MAX_BANDS];\n    int threshold[CELT_MAX_BANDS];\n    int bits1[CELT_MAX_BANDS];\n    int bits2[CELT_MAX_BANDS];\n    int trim_offset[CELT_MAX_BANDS];\n    int skip_startband = s->startband;\n    int dynalloc       = 6;\n    int alloctrim      = 5;\n    int extrabits      = 0;\n    int skip_bit            = 0;\n    int intensitystereo_bit = 0;\n    int dualstereo_bit      = 0;\n    int remaining, bandbits;\n    int low, high, total, done;\n    int totalbits;\n    int consumed;\n    int i, j;\n    consumed = opus_rc_tell(rc);\n    s->spread = CELT_SPREAD_NORMAL;\n    if (consumed + 4 <= s->framebits)\n        s->spread = opus_rc_getsymbol(rc, celt_model_spread);\n    for (i = 0; i < CELT_MAX_BANDS; i++) {\n        cap[i] = (celt_static_caps[s->duration][s->coded_channels - 1][i] + 64)\n                 * celt_freq_range[i] << (s->coded_channels - 1) << s->duration >> 2;\n    }\n    totalbits = s->framebits << 3;\n    consumed = opus_rc_tell_frac(rc);\n    for (i = s->startband; i < s->endband; i++) {\n        int quanta, band_dynalloc;\n        boost[i] = 0;\n        quanta = celt_freq_range[i] << (s->coded_channels - 1) << s->duration;\n        quanta = FFMIN(quanta << 3, FFMAX(6 << 3, quanta));\n        band_dynalloc = dynalloc;\n        while (consumed + (band_dynalloc<<3) < totalbits && boost[i] < cap[i]) {\n            int add = opus_rc_p2model(rc, band_dynalloc);\n            consumed = opus_rc_tell_frac(rc);\n            if (!add)\n                break;\n            boost[i]     += quanta;\n            totalbits    -= quanta;\n            band_dynalloc = 1;\n        }\n        if (boost[i])\n            dynalloc = FFMAX(2, dynalloc - 1);\n    }\n    if (consumed + (6 << 3) <= totalbits)\n        alloctrim = opus_rc_getsymbol(rc, celt_model_alloc_trim);\n    totalbits = (s->framebits << 3) - opus_rc_tell_frac(rc) - 1;\n    s->anticollapse_bit = 0;\n    if (s->blocks > 1 && s->duration >= 2 &&\n        totalbits >= ((s->duration + 2) << 3))\n        s->anticollapse_bit = 1 << 3;\n    totalbits -= s->anticollapse_bit;\n    if (totalbits >= 1 << 3)\n        skip_bit = 1 << 3;\n    totalbits -= skip_bit;\n    if (s->coded_channels == 2) {\n        intensitystereo_bit = celt_log2_frac[s->endband - s->startband];\n        if (intensitystereo_bit <= totalbits) {\n            totalbits -= intensitystereo_bit;\n            if (totalbits >= 1 << 3) {\n                dualstereo_bit = 1 << 3;\n                totalbits -= 1 << 3;\n            }\n        } else\n            intensitystereo_bit = 0;\n    }\n    for (i = s->startband; i < s->endband; i++) {\n        int trim     = alloctrim - 5 - s->duration;\n        int band     = celt_freq_range[i] * (s->endband - i - 1);\n        int duration = s->duration + 3;\n        int scale    = duration + s->coded_channels - 1;\n        threshold[i] = FFMAX(3 * celt_freq_range[i] << duration >> 4,\n                             s->coded_channels << 3);\n        trim_offset[i] = trim * (band << scale) >> 6;\n        if (celt_freq_range[i] << s->duration == 1)\n            trim_offset[i] -= s->coded_channels << 3;\n    }\n    low  = 1;\n    high = CELT_VECTORS - 1;\n    while (low <= high) {\n        int center = (low + high) >> 1;\n        done = total = 0;\n        for (i = s->endband - 1; i >= s->startband; i--) {\n            bandbits = celt_freq_range[i] * celt_static_alloc[center][i]\n                       << (s->coded_channels - 1) << s->duration >> 2;\n            if (bandbits)\n                bandbits = FFMAX(0, bandbits + trim_offset[i]);\n            bandbits += boost[i];\n            if (bandbits >= threshold[i] || done) {\n                done = 1;\n                total += FFMIN(bandbits, cap[i]);\n            } else if (bandbits >= s->coded_channels << 3)\n                total += s->coded_channels << 3;\n        }\n        if (total > totalbits)\n            high = center - 1;\n        else\n            low = center + 1;\n    }\n    high = low--;\n    for (i = s->startband; i < s->endband; i++) {\n        bits1[i] = celt_freq_range[i] * celt_static_alloc[low][i]\n                   << (s->coded_channels - 1) << s->duration >> 2;\n        bits2[i] = high >= CELT_VECTORS ? cap[i] :\n                   celt_freq_range[i] * celt_static_alloc[high][i]\n                   << (s->coded_channels - 1) << s->duration >> 2;\n        if (bits1[i])\n            bits1[i] = FFMAX(0, bits1[i] + trim_offset[i]);\n        if (bits2[i])\n            bits2[i] = FFMAX(0, bits2[i] + trim_offset[i]);\n        if (low)\n            bits1[i] += boost[i];\n        bits2[i] += boost[i];\n        if (boost[i])\n            skip_startband = i;\n        bits2[i] = FFMAX(0, bits2[i] - bits1[i]);\n    }\n    low  = 0;\n    high = 1 << CELT_ALLOC_STEPS;\n    for (i = 0; i < CELT_ALLOC_STEPS; i++) {\n        int center = (low + high) >> 1;\n        done = total = 0;\n        for (j = s->endband - 1; j >= s->startband; j--) {\n            bandbits = bits1[j] + (center * bits2[j] >> CELT_ALLOC_STEPS);\n            if (bandbits >= threshold[j] || done) {\n                done = 1;\n                total += FFMIN(bandbits, cap[j]);\n            } else if (bandbits >= s->coded_channels << 3)\n                total += s->coded_channels << 3;\n        }\n        if (total > totalbits)\n            high = center;\n        else\n            low = center;\n    }\n    done = total = 0;\n    for (i = s->endband - 1; i >= s->startband; i--) {\n        bandbits = bits1[i] + (low * bits2[i] >> CELT_ALLOC_STEPS);\n        if (bandbits >= threshold[i] || done)\n            done = 1;\n        else\n            bandbits = (bandbits >= s->coded_channels << 3) ?\n                       s->coded_channels << 3 : 0;\n        bandbits     = FFMIN(bandbits, cap[i]);\n        s->pulses[i] = bandbits;\n        total      += bandbits;\n    }\n    for (s->codedbands = s->endband; ; s->codedbands--) {\n        int allocation;\n        j = s->codedbands - 1;\n        if (j == skip_startband) {\n            totalbits += skip_bit;\n            break;\n        }\n        remaining   = totalbits - total;\n        bandbits    = remaining / (celt_freq_bands[j+1] - celt_freq_bands[s->startband]);\n        remaining  -= bandbits  * (celt_freq_bands[j+1] - celt_freq_bands[s->startband]);\n        allocation  = s->pulses[j] + bandbits * celt_freq_range[j]\n                      + FFMAX(0, remaining - (celt_freq_bands[j] - celt_freq_bands[s->startband]));\n        if (allocation >= FFMAX(threshold[j], (s->coded_channels + 1) <<3 )) {\n            if (opus_rc_p2model(rc, 1))\n                break;\n            total      += 1 << 3;\n            allocation -= 1 << 3;\n        }\n        total -= s->pulses[j];\n        if (intensitystereo_bit) {\n            total -= intensitystereo_bit;\n            intensitystereo_bit = celt_log2_frac[j - s->startband];\n            total += intensitystereo_bit;\n        }\n        total += s->pulses[j] = (allocation >= s->coded_channels << 3) ?\n                              s->coded_channels << 3 : 0;\n    }\n    s->intensitystereo = 0;\n    s->dualstereo      = 0;\n    if (intensitystereo_bit)\n        s->intensitystereo = s->startband +\n                          opus_rc_unimodel(rc, s->codedbands + 1 - s->startband);\n    if (s->intensitystereo <= s->startband)\n        totalbits += dualstereo_bit;\n    else if (dualstereo_bit)\n        s->dualstereo = opus_rc_p2model(rc, 1);\n    remaining = totalbits - total;\n    bandbits  = remaining / (celt_freq_bands[s->codedbands] - celt_freq_bands[s->startband]);\n    remaining -= bandbits * (celt_freq_bands[s->codedbands] - celt_freq_bands[s->startband]);\n    for (i = s->startband; i < s->codedbands; i++) {\n        int bits = FFMIN(remaining, celt_freq_range[i]);\n        s->pulses[i] += bits + bandbits * celt_freq_range[i];\n        remaining    -= bits;\n    }\n    for (i = s->startband; i < s->codedbands; i++) {\n        int N = celt_freq_range[i] << s->duration;\n        int prev_extra = extrabits;\n        s->pulses[i] += extrabits;\n        if (N > 1) {\n            int dof;\n            int temp;\n            int offset;\n            int fine_bits, max_bits;\n            extrabits = FFMAX(0, s->pulses[i] - cap[i]);\n            s->pulses[i] -= extrabits;\n            dof = N * s->coded_channels\n                  + (s->coded_channels == 2 && N > 2 && !s->dualstereo && i < s->intensitystereo);\n            temp = dof * (celt_log_freq_range[i] + (s->duration<<3));\n            offset = (temp >> 1) - dof * CELT_FINE_OFFSET;\n            if (N == 2)\n                offset += dof<<1;\n            if (s->pulses[i] + offset < 2 * (dof << 3))\n                offset += temp >> 2;\n            else if (s->pulses[i] + offset < 3 * (dof << 3))\n                offset += temp >> 3;\n            fine_bits = (s->pulses[i] + offset + (dof << 2)) / (dof << 3);\n            max_bits  = FFMIN((s->pulses[i]>>3) >> (s->coded_channels - 1),\n                              CELT_MAX_FINE_BITS);\n            max_bits  = FFMAX(max_bits, 0);\n            s->fine_bits[i] = av_clip(fine_bits, 0, max_bits);\n            s->fine_priority[i] = (s->fine_bits[i] * (dof<<3) >= s->pulses[i] + offset);\n            s->pulses[i] -= s->fine_bits[i] << (s->coded_channels - 1) << 3;\n        } else {\n            extrabits = FFMAX(0, s->pulses[i] - (s->coded_channels << 3));\n            s->pulses[i] -= extrabits;\n            s->fine_bits[i] = 0;\n            s->fine_priority[i] = 1;\n        }\n        if (extrabits > 0) {\n            int fineextra = FFMIN(extrabits >> (s->coded_channels + 2),\n                                  CELT_MAX_FINE_BITS - s->fine_bits[i]);\n            s->fine_bits[i] += fineextra;\n            fineextra <<= s->coded_channels + 2;\n            s->fine_priority[i] = (fineextra >= extrabits - prev_extra);\n            extrabits -= fineextra;\n        }\n    }\n    s->remaining = extrabits;\n    for (; i < s->endband; i++) {\n        s->fine_bits[i]     = s->pulses[i] >> (s->coded_channels - 1) >> 3;\n        s->pulses[i]        = 0;\n        s->fine_priority[i] = s->fine_bits[i] < 1;\n    }\n}']