libavcodec/ra144enc.c:488: error: Buffer Overrun L3
  Offset: [-8, 9] (⇐ [0, 1] + [-8, 8]) Size: 33 by call to `ff_lpc_calc_coefs`.

libavcodec/ra144enc.c:488:5: Call
486.                                     32)];
487. 
488.     ff_lpc_calc_coefs(&ractx->lpc_ctx, lpc_data, NBLOCKS * BLOCKSIZE, LPC_ORDER,
         ^
489.                       LPC_ORDER, 16, lpc_coefs, shift, FF_LPC_TYPE_LEVINSON,
490.                       0, ORDER_METHOD_EST, 12, 0);

libavcodec/lpc.c:157:1: Array declaration
  155.  *                 see #FFLPCType for details
  156.  */
  157. int ff_lpc_calc_coefs(LPCContext *s,
       ^
  158.                       const int32_t *samples, int blocksize, int min_order,
  159.                       int max_order, int precision,

libavcodec/lpc.c:185:9: Call
  183.         s->lpc_compute_autocorr(s->windowed_samples, blocksize, max_order, autoc);
  184. 
  185.         compute_lpc_coefs(autoc, max_order, &lpc[0][0], MAX_LPC_ORDER, 0, 1);
               ^
  186. 
  187.         for(i=0; i<max_order; i++)

libavcodec/lpc.h:117:1: <Offset trace>
115.  * Produce LPC coefficients from autocorrelation data.
116.  */
117. static inline int compute_lpc_coefs(const LPC_TYPE *autoc, int max_order,
     ^
118.                                     LPC_TYPE *lpc, int lpc_stride, int fail,
119.                                     int normalize)

libavcodec/lpc.h:117:1: Parameter `max_order`
    115.  * Produce LPC coefficients from autocorrelation data.
    116.  */
    117. static inline int compute_lpc_coefs(const LPC_TYPE *autoc, int max_order,
         ^
    118.                                     LPC_TYPE *lpc, int lpc_stride, int fail,
    119.                                     int normalize)

libavcodec/lpc.h:117:1: <Length trace>
115.  * Produce LPC coefficients from autocorrelation data.
116.  */
117. static inline int compute_lpc_coefs(const LPC_TYPE *autoc, int max_order,
     ^
118.                                     LPC_TYPE *lpc, int lpc_stride, int fail,
119.                                     int normalize)

libavcodec/lpc.h:117:1: Parameter `*autoc`
    115.  * Produce LPC coefficients from autocorrelation data.
    116.  */
    117. static inline int compute_lpc_coefs(const LPC_TYPE *autoc, int max_order,
         ^
    118.                                     LPC_TYPE *lpc, int lpc_stride, int fail,
    119.                                     int normalize)

libavcodec/lpc.h:136:36: Array access: Offset: [-8, 9] (⇐ [0, 1] + [-8, 8]) Size: 33 by call to `ff_lpc_calc_coefs` 
    134.         if (normalize) {
    135.             for(j=0; j<i; j++)
    136.                 r -= lpc_last[j] * autoc[i-j-1];
                                            ^
    137. 
    138.             r /= err;

static inline int compute_lpc_coefs(const LPC_TYPE *autoc, int max_order,
                                    LPC_TYPE *lpc, int lpc_stride, int fail,
                                    int normalize)
{
    int i, j;
    LPC_TYPE err;
    LPC_TYPE *lpc_last = lpc;
    if (normalize)
        err = *autoc++;
    if (fail && (autoc[max_order - 1] == 0 || err <= 0))
        return -1;
    for(i=0; i<max_order; i++) {
        LPC_TYPE r = -autoc[i];
        if (normalize) {
            for(j=0; j<i; j++)
                r -= lpc_last[j] * autoc[i-j-1];
            r /= err;
            err *= 1.0 - (r * r);
        }
        lpc[i] = r;
        for(j=0; j < (i+1)>>1; j++) {
            LPC_TYPE f = lpc_last[    j];
            LPC_TYPE b = lpc_last[i-1-j];
            lpc[    j] = f + r * b;
            lpc[i-1-j] = b + r * f;
        }
        if (fail && err < 0)
            return -1;
        lpc_last = lpc;
        lpc += lpc_stride;
    }
    return 0;
}
['static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,\n                              const AVFrame *frame, int *got_packet_ptr)\n{\n    static const uint8_t sizes[LPC_ORDER] = {64, 32, 32, 16, 16, 8, 8, 8, 8, 4};\n    static const uint8_t bit_sizes[LPC_ORDER] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2};\n    RA144Context *ractx = avctx->priv_data;\n    PutBitContext pb;\n    int32_t lpc_data[NBLOCKS * BLOCKSIZE];\n    int32_t lpc_coefs[LPC_ORDER][MAX_LPC_ORDER];\n    int shift[LPC_ORDER];\n    int16_t block_coefs[NBLOCKS][LPC_ORDER];\n    int lpc_refl[LPC_ORDER];\n    unsigned int refl_rms[NBLOCKS];\n    const int16_t *samples = frame ? (const int16_t *)frame->data[0] : NULL;\n    int energy = 0;\n    int i, idx, ret;\n    if (ractx->last_frame)\n        return 0;\n    if ((ret = ff_alloc_packet(avpkt, FRAMESIZE))) {\n        av_log(avctx, AV_LOG_ERROR, "Error getting output packet\\n");\n        return ret;\n    }\n    for (i = 0; i < (2 * BLOCKSIZE + BLOCKSIZE / 2); i++) {\n        lpc_data[i] = ractx->curr_block[BLOCKSIZE + BLOCKSIZE / 2 + i];\n        energy += (lpc_data[i] * lpc_data[i]) >> 4;\n    }\n    if (frame) {\n        int j;\n        for (j = 0; j < frame->nb_samples && i < NBLOCKS * BLOCKSIZE; i++, j++) {\n            lpc_data[i] = samples[j] >> 2;\n            energy += (lpc_data[i] * lpc_data[i]) >> 4;\n        }\n    }\n    if (i < NBLOCKS * BLOCKSIZE)\n        memset(&lpc_data[i], 0, (NBLOCKS * BLOCKSIZE - i) * sizeof(*lpc_data));\n    energy = ff_energy_tab[quantize(ff_t_sqrt(energy >> 5) >> 10, ff_energy_tab,\n                                    32)];\n    ff_lpc_calc_coefs(&ractx->lpc_ctx, lpc_data, NBLOCKS * BLOCKSIZE, LPC_ORDER,\n                      LPC_ORDER, 16, lpc_coefs, shift, FF_LPC_TYPE_LEVINSON,\n                      0, ORDER_METHOD_EST, 12, 0);\n    for (i = 0; i < LPC_ORDER; i++)\n        block_coefs[NBLOCKS - 1][i] = -(lpc_coefs[LPC_ORDER - 1][i] <<\n                                        (12 - shift[LPC_ORDER - 1]));\n    if (ff_eval_refl(lpc_refl, block_coefs[NBLOCKS - 1], avctx)) {\n        ff_int_to_int16(block_coefs[NBLOCKS - 1], ractx->lpc_coef[1]);\n        if (ff_eval_refl(lpc_refl, block_coefs[NBLOCKS - 1], avctx)) {\n            memset(lpc_refl, 0, sizeof(lpc_refl));\n        }\n    }\n    init_put_bits(&pb, avpkt->data, avpkt->size);\n    for (i = 0; i < LPC_ORDER; i++) {\n        idx = quantize(lpc_refl[i], ff_lpc_refl_cb[i], sizes[i]);\n        put_bits(&pb, bit_sizes[i], idx);\n        lpc_refl[i] = ff_lpc_refl_cb[i][idx];\n    }\n    ractx->lpc_refl_rms[0] = ff_rms(lpc_refl);\n    ff_eval_coefs(ractx->lpc_coef[0], lpc_refl);\n    refl_rms[0] = ff_interp(ractx, block_coefs[0], 1, 1, ractx->old_energy);\n    refl_rms[1] = ff_interp(ractx, block_coefs[1], 2,\n                            energy <= ractx->old_energy,\n                            ff_t_sqrt(energy * ractx->old_energy) >> 12);\n    refl_rms[2] = ff_interp(ractx, block_coefs[2], 3, 0, energy);\n    refl_rms[3] = ff_rescale_rms(ractx->lpc_refl_rms[0], energy);\n    ff_int_to_int16(block_coefs[NBLOCKS - 1], ractx->lpc_coef[0]);\n    put_bits(&pb, 5, quantize(energy, ff_energy_tab, 32));\n    for (i = 0; i < NBLOCKS; i++)\n        ra144_encode_subblock(ractx, ractx->curr_block + i * BLOCKSIZE,\n                              block_coefs[i], refl_rms[i], &pb);\n    flush_put_bits(&pb);\n    ractx->old_energy = energy;\n    ractx->lpc_refl_rms[1] = ractx->lpc_refl_rms[0];\n    FFSWAP(unsigned int *, ractx->lpc_coef[0], ractx->lpc_coef[1]);\n    i = 0;\n    if (frame) {\n        for (; i < frame->nb_samples; i++)\n            ractx->curr_block[i] = samples[i] >> 2;\n        if ((ret = ff_af_queue_add(&ractx->afq, frame) < 0))\n            return ret;\n    } else\n        ractx->last_frame = 1;\n    memset(&ractx->curr_block[i], 0,\n           (NBLOCKS * BLOCKSIZE - i) * sizeof(*ractx->curr_block));\n    ff_af_queue_remove(&ractx->afq, avctx->frame_size, &avpkt->pts,\n                       &avpkt->duration);\n    avpkt->size = FRAMESIZE;\n    *got_packet_ptr = 1;\n    return 0;\n}', 'int ff_lpc_calc_coefs(LPCContext *s,\n                      const int32_t *samples, int blocksize, int min_order,\n                      int max_order, int precision,\n                      int32_t coefs[][MAX_LPC_ORDER], int *shift,\n                      enum FFLPCType lpc_type, int lpc_passes,\n                      int omethod, int max_shift, int zero_shift)\n{\n    double autoc[MAX_LPC_ORDER+1];\n    double ref[MAX_LPC_ORDER];\n    double lpc[MAX_LPC_ORDER][MAX_LPC_ORDER];\n    int i, j, pass;\n    int opt_order;\n    assert(max_order >= MIN_LPC_ORDER && max_order <= MAX_LPC_ORDER &&\n           lpc_type > FF_LPC_TYPE_FIXED);\n    if (blocksize != s->blocksize || max_order != s->max_order ||\n        lpc_type  != s->lpc_type) {\n        ff_lpc_end(s);\n        ff_lpc_init(s, blocksize, max_order, lpc_type);\n    }\n    if (lpc_type == FF_LPC_TYPE_LEVINSON) {\n        s->lpc_apply_welch_window(samples, blocksize, s->windowed_samples);\n        s->lpc_compute_autocorr(s->windowed_samples, blocksize, max_order, autoc);\n        compute_lpc_coefs(autoc, max_order, &lpc[0][0], MAX_LPC_ORDER, 0, 1);\n        for(i=0; i<max_order; i++)\n            ref[i] = fabs(lpc[i][i]);\n    } else if (lpc_type == FF_LPC_TYPE_CHOLESKY) {\n        LLSModel m[2];\n        double var[MAX_LPC_ORDER+1], av_uninit(weight);\n        for(pass=0; pass<lpc_passes; pass++){\n            av_init_lls(&m[pass&1], max_order);\n            weight=0;\n            for(i=max_order; i<blocksize; i++){\n                for(j=0; j<=max_order; j++)\n                    var[j]= samples[i-j];\n                if(pass){\n                    double eval, inv, rinv;\n                    eval= av_evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);\n                    eval= (512>>pass) + fabs(eval - var[0]);\n                    inv = 1/eval;\n                    rinv = sqrt(inv);\n                    for(j=0; j<=max_order; j++)\n                        var[j] *= rinv;\n                    weight += inv;\n                }else\n                    weight++;\n                av_update_lls(&m[pass&1], var, 1.0);\n            }\n            av_solve_lls(&m[pass&1], 0.001, 0);\n        }\n        for(i=0; i<max_order; i++){\n            for(j=0; j<max_order; j++)\n                lpc[i][j]=-m[(pass-1)&1].coeff[i][j];\n            ref[i]= sqrt(m[(pass-1)&1].variance[i] / weight) * (blocksize - max_order) / 4000;\n        }\n        for(i=max_order-1; i>0; i--)\n            ref[i] = ref[i-1] - ref[i];\n    }\n    opt_order = max_order;\n    if(omethod == ORDER_METHOD_EST) {\n        opt_order = estimate_best_order(ref, min_order, max_order);\n        i = opt_order-1;\n        quantize_lpc_coefs(lpc[i], i+1, precision, coefs[i], &shift[i], max_shift, zero_shift);\n    } else {\n        for(i=min_order-1; i<max_order; i++) {\n            quantize_lpc_coefs(lpc[i], i+1, precision, coefs[i], &shift[i], max_shift, zero_shift);\n        }\n    }\n    return opt_order;\n}', 'static inline int compute_lpc_coefs(const LPC_TYPE *autoc, int max_order,\n                                    LPC_TYPE *lpc, int lpc_stride, int fail,\n                                    int normalize)\n{\n    int i, j;\n    LPC_TYPE err;\n    LPC_TYPE *lpc_last = lpc;\n    if (normalize)\n        err = *autoc++;\n    if (fail && (autoc[max_order - 1] == 0 || err <= 0))\n        return -1;\n    for(i=0; i<max_order; i++) {\n        LPC_TYPE r = -autoc[i];\n        if (normalize) {\n            for(j=0; j<i; j++)\n                r -= lpc_last[j] * autoc[i-j-1];\n            r /= err;\n            err *= 1.0 - (r * r);\n        }\n        lpc[i] = r;\n        for(j=0; j < (i+1)>>1; j++) {\n            LPC_TYPE f = lpc_last[    j];\n            LPC_TYPE b = lpc_last[i-1-j];\n            lpc[    j] = f + r * b;\n            lpc[i-1-j] = b + r * f;\n        }\n        if (fail && err < 0)\n            return -1;\n        lpc_last = lpc;\n        lpc += lpc_stride;\n    }\n    return 0;\n}']