libavcodec/aacsbr.c:1700: error: Buffer Overrun L1
  Offset: 2 (⇐ 1 + 1) Size: 2 by call to `ff_ps_apply`.

libavcodec/aacsbr.c:1648:1: Parameter `sbr->X[*]`
1646. }
1647. 
1648. void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,
      ^
1649.                   float* L, float* R)
1650. {

libavcodec/aacsbr.c:1700:13: Call
1698.     if (ac->oc[1].m4ac.ps == 1) {
1699.         if (sbr->ps.start) {
1700.             ff_ps_apply(ac->avctx, &sbr->ps, sbr->X[0], sbr->X[1], sbr->kx[1] + sbr->m[1]);
                  ^
1701.         } else {
1702.             memcpy(sbr->X[1], sbr->X[0], sizeof(sbr->X[0]));

libavcodec/aacps.c:980:1: Parameter `*R`
  978. }
  979. 
  980. int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float R[2][38][64], int top)
       ^
  981. {
  982.     float Lbuf[91][32][2];

libavcodec/aacps.c:996:5: Call
  994.     stereo_processing(ps, Lbuf, Rbuf, is34);
  995.     hybrid_synthesis(L, Lbuf, is34, len);
  996.     hybrid_synthesis(R, Rbuf, is34, len);
           ^
  997. 
  998.     return 0;

libavcodec/aacps.c:401:1: <Length trace>
399. }
400. 
401. static void hybrid_synthesis(float out[2][38][64], float in[91][32][2], int is34, int len)
     ^
402. {
403.     int i, n;

libavcodec/aacps.c:401:1: Parameter `*out`
    399. }
    400. 
    401. static void hybrid_synthesis(float out[2][38][64], float in[91][32][2], int is34, int len)
         ^
    402. {
    403.     int i, n;

libavcodec/aacps.c:410:17: Array access: Offset: 2 (⇐ 1 + 1) Size: 2 by call to `ff_ps_apply` 
    408.             for (i = 0; i < 12; i++) {
    409.                 out[0][n][0] += in[   i][n][0];
    410.                 out[1][n][0] += in[   i][n][1];
                         ^
    411.             }
    412.             for (i = 0; i < 8; i++) {

static void hybrid_synthesis(float out[2][38][64], float in[91][32][2], int is34, int len)
{
    int i, n;
    if (is34) {
        for (n = 0; n < len; n++) {
            memset(out[0][n], 0, 5*sizeof(out[0][n][0]));
            memset(out[1][n], 0, 5*sizeof(out[1][n][0]));
            for (i = 0; i < 12; i++) {
                out[0][n][0] += in[   i][n][0];
                out[1][n][0] += in[   i][n][1];
            }
            for (i = 0; i < 8; i++) {
                out[0][n][1] += in[12+i][n][0];
                out[1][n][1] += in[12+i][n][1];
            }
            for (i = 0; i < 4; i++) {
                out[0][n][2] += in[20+i][n][0];
                out[1][n][2] += in[20+i][n][1];
                out[0][n][3] += in[24+i][n][0];
                out[1][n][3] += in[24+i][n][1];
                out[0][n][4] += in[28+i][n][0];
                out[1][n][4] += in[28+i][n][1];
            }
        }
        for (i = 0; i < 59; i++) {
            for (n = 0; n < len; n++) {
                out[0][n][i+5] = in[i+32][n][0];
                out[1][n][i+5] = in[i+32][n][1];
            }
        }
    } else {
        for (n = 0; n < len; n++) {
            out[0][n][0] = in[0][n][0] + in[1][n][0] + in[2][n][0] +
                           in[3][n][0] + in[4][n][0] + in[5][n][0];
            out[1][n][0] = in[0][n][1] + in[1][n][1] + in[2][n][1] +
                           in[3][n][1] + in[4][n][1] + in[5][n][1];
            out[0][n][1] = in[6][n][0] + in[7][n][0];
            out[1][n][1] = in[6][n][1] + in[7][n][1];
            out[0][n][2] = in[8][n][0] + in[9][n][0];
            out[1][n][2] = in[8][n][1] + in[9][n][1];
        }
        for (i = 0; i < 61; i++) {
            for (n = 0; n < len; n++) {
                out[0][n][i+3] = in[i+10][n][0];
                out[1][n][i+3] = in[i+10][n][1];
            }
        }
    }
}
['void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,\n                  float* L, float* R)\n{\n    int downsampled = ac->oc[1].m4ac.ext_sample_rate < sbr->sample_rate;\n    int ch;\n    int nch = (id_aac == TYPE_CPE) ? 2 : 1;\n    int err;\n    if (!sbr->kx_and_m_pushed) {\n        sbr->kx[0] = sbr->kx[1];\n        sbr->m[0] = sbr->m[1];\n    } else {\n        sbr->kx_and_m_pushed = 0;\n    }\n    if (sbr->start) {\n        sbr_dequant(sbr, id_aac);\n    }\n    for (ch = 0; ch < nch; ch++) {\n        sbr_qmf_analysis(&ac->dsp, &sbr->mdct_ana, &sbr->dsp, ch ? R : L, sbr->data[ch].analysis_filterbank_samples,\n                         (float*)sbr->qmf_filter_scratch,\n                         sbr->data[ch].W);\n        sbr_lf_gen(ac, sbr, sbr->X_low, sbr->data[ch].W);\n        sbr->data[ch].Ypos ^= 1;\n        if (sbr->start) {\n            sbr_hf_inverse_filter(&sbr->dsp, sbr->alpha0, sbr->alpha1, sbr->X_low, sbr->k[0]);\n            sbr_chirp(sbr, &sbr->data[ch]);\n            sbr_hf_gen(ac, sbr, sbr->X_high, sbr->X_low, sbr->alpha0, sbr->alpha1,\n                       sbr->data[ch].bw_array, sbr->data[ch].t_env,\n                       sbr->data[ch].bs_num_env);\n            err = sbr_mapping(ac, sbr, &sbr->data[ch], sbr->data[ch].e_a);\n            if (!err) {\n                sbr_env_estimate(sbr->e_curr, sbr->X_high, sbr, &sbr->data[ch]);\n                sbr_gain_calc(ac, sbr, &sbr->data[ch], sbr->data[ch].e_a);\n                sbr_hf_assemble(sbr->data[ch].Y[sbr->data[ch].Ypos],\n                                sbr->X_high, sbr, &sbr->data[ch],\n                                sbr->data[ch].e_a);\n            }\n        }\n        sbr_x_gen(sbr, sbr->X[ch],\n                  sbr->data[ch].Y[1-sbr->data[ch].Ypos],\n                  sbr->data[ch].Y[  sbr->data[ch].Ypos],\n                  sbr->X_low, ch);\n    }\n    if (ac->oc[1].m4ac.ps == 1) {\n        if (sbr->ps.start) {\n            ff_ps_apply(ac->avctx, &sbr->ps, sbr->X[0], sbr->X[1], sbr->kx[1] + sbr->m[1]);\n        } else {\n            memcpy(sbr->X[1], sbr->X[0], sizeof(sbr->X[0]));\n        }\n        nch = 2;\n    }\n    sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, &sbr->dsp, L, sbr->X[0], sbr->qmf_filter_scratch,\n                      sbr->data[0].synthesis_filterbank_samples,\n                      &sbr->data[0].synthesis_filterbank_samples_offset,\n                      downsampled);\n    if (nch == 2)\n        sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, &sbr->dsp, R, sbr->X[1], sbr->qmf_filter_scratch,\n                          sbr->data[1].synthesis_filterbank_samples,\n                          &sbr->data[1].synthesis_filterbank_samples_offset,\n                          downsampled);\n}', 'int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float R[2][38][64], int top)\n{\n    float Lbuf[91][32][2];\n    float Rbuf[91][32][2];\n    const int len = 32;\n    int is34 = ps->is34bands;\n    top += NR_BANDS[is34] - 64;\n    memset(ps->delay+top, 0, (NR_BANDS[is34] - top)*sizeof(ps->delay[0]));\n    if (top < NR_ALLPASS_BANDS[is34])\n        memset(ps->ap_delay + top, 0, (NR_ALLPASS_BANDS[is34] - top)*sizeof(ps->ap_delay[0]));\n    hybrid_analysis(Lbuf, ps->in_buf, L, is34, len);\n    decorrelation(ps, Rbuf, Lbuf, is34);\n    stereo_processing(ps, Lbuf, Rbuf, is34);\n    hybrid_synthesis(L, Lbuf, is34, len);\n    hybrid_synthesis(R, Rbuf, is34, len);\n    return 0;\n}', 'static void hybrid_synthesis(float out[2][38][64], float in[91][32][2], int is34, int len)\n{\n    int i, n;\n    if (is34) {\n        for (n = 0; n < len; n++) {\n            memset(out[0][n], 0, 5*sizeof(out[0][n][0]));\n            memset(out[1][n], 0, 5*sizeof(out[1][n][0]));\n            for (i = 0; i < 12; i++) {\n                out[0][n][0] += in[   i][n][0];\n                out[1][n][0] += in[   i][n][1];\n            }\n            for (i = 0; i < 8; i++) {\n                out[0][n][1] += in[12+i][n][0];\n                out[1][n][1] += in[12+i][n][1];\n            }\n            for (i = 0; i < 4; i++) {\n                out[0][n][2] += in[20+i][n][0];\n                out[1][n][2] += in[20+i][n][1];\n                out[0][n][3] += in[24+i][n][0];\n                out[1][n][3] += in[24+i][n][1];\n                out[0][n][4] += in[28+i][n][0];\n                out[1][n][4] += in[28+i][n][1];\n            }\n        }\n        for (i = 0; i < 59; i++) {\n            for (n = 0; n < len; n++) {\n                out[0][n][i+5] = in[i+32][n][0];\n                out[1][n][i+5] = in[i+32][n][1];\n            }\n        }\n    } else {\n        for (n = 0; n < len; n++) {\n            out[0][n][0] = in[0][n][0] + in[1][n][0] + in[2][n][0] +\n                           in[3][n][0] + in[4][n][0] + in[5][n][0];\n            out[1][n][0] = in[0][n][1] + in[1][n][1] + in[2][n][1] +\n                           in[3][n][1] + in[4][n][1] + in[5][n][1];\n            out[0][n][1] = in[6][n][0] + in[7][n][0];\n            out[1][n][1] = in[6][n][1] + in[7][n][1];\n            out[0][n][2] = in[8][n][0] + in[9][n][0];\n            out[1][n][2] = in[8][n][1] + in[9][n][1];\n        }\n        for (i = 0; i < 61; i++) {\n            for (n = 0; n < len; n++) {\n                out[0][n][i+3] = in[i+10][n][0];\n                out[1][n][i+3] = in[i+10][n][1];\n            }\n        }\n    }\n}']