libavcodec/dcadec.c:950: error: Buffer Overrun L1
  Offset: [32, `s->prim_channels` + 62] (⇐ [0, `s->prim_channels` - 1] + [32, 63]) Size: 7 by call to `qmf_64_subbands`.

libavcodec/dcadec.c:935:1: Parameter `s->prim_channels`
933. }
934. 
935. static int dca_filter_channels(DCAContext *s, int block_index, int upsample)
     ^
936. {
937.     float (*subband_samples)[DCA_SUBBANDS][SAMPLES_PER_SUBBAND] = s->subband_samples[block_index];

libavcodec/dcadec.c:950:17: Call
948.         for (k = 0; k < s->prim_channels; k++) {
949.             if (s->channel_order_tab[k] >= 0)
950.                 qmf_64_subbands(s, k, subband_samples[k],
                     ^
951.                                 s->samples_chanptr[s->channel_order_tab[k]],
952.                                 /* Upsampling needs a factor 2 here. */

libavcodec/dcadec.c:614:14: <Offset trace>
612.                 B[k] += (raXin[2 * i] + raXin[2 * i - 1]) * s->qmf64_table->dct2_coeff[k][i];
613.         }
614.         for (k = 0; k < 32; k++) {
                  ^
615.             raX[k]      = s->qmf64_table->rcos[k] * (A[k] + B[k]);
616.             raX[63 - k] = s->qmf64_table->rsin[k] * (A[k] - B[k]);

libavcodec/dcadec.c:614:14: Assignment
  612.                 B[k] += (raXin[2 * i] + raXin[2 * i - 1]) * s->qmf64_table->dct2_coeff[k][i];
  613.         }
  614.         for (k = 0; k < 32; k++) {
                    ^
  615.             raX[k]      = s->qmf64_table->rcos[k] * (A[k] + B[k]);
  616.             raX[63 - k] = s->qmf64_table->rsin[k] * (A[k] - B[k]);

libavcodec/dcadec.c:589:1: <Length trace>
587.  * http://multimedia.cx/mirror/dca-transform.pdf, with guessed tweaks
588.  * for doubling the size. */
589. static void qmf_64_subbands(DCAContext *s, int chans, float samples_in[64][SAMPLES_PER_SUBBAND],
     ^
590.                             float *samples_out, float scale)
591. {

libavcodec/dcadec.c:589:1: Parameter `chans`
  587.  * http://multimedia.cx/mirror/dca-transform.pdf, with guessed tweaks
  588.  * for doubling the size. */
  589. static void qmf_64_subbands(DCAContext *s, int chans, float samples_in[64][SAMPLES_PER_SUBBAND],
       ^
  590.                             float *samples_out, float scale)
  591. {

libavcodec/dcadec.c:594:5: Assignment
  592.     float raXin[64];
  593.     float A[32], B[32];
  594.     float *raX = s->subband_fir_hist[chans];
           ^
  595.     float *raZ = s->subband_fir_noidea[chans];
  596.     unsigned i, j, k, subindex;

libavcodec/dcadec.c:616:13: Array access: Offset: [32, s->prim_channels + 62] (⇐ [0, s->prim_channels - 1] + [32, 63]) Size: 7 by call to `qmf_64_subbands` 
  614.         for (k = 0; k < 32; k++) {
  615.             raX[k]      = s->qmf64_table->rcos[k] * (A[k] + B[k]);
  616.             raX[63 - k] = s->qmf64_table->rsin[k] * (A[k] - B[k]);
                   ^
  617.         }
  618. 

static void qmf_64_subbands(DCAContext *s, int chans, float samples_in[64][SAMPLES_PER_SUBBAND],
                            float *samples_out, float scale)
{
    float raXin[64];
    float A[32], B[32];
    float *raX = s->subband_fir_hist[chans];
    float *raZ = s->subband_fir_noidea[chans];
    unsigned i, j, k, subindex;
    for (i = s->subband_activity[chans]; i < 64; i++)
        raXin[i] = 0.0;
    for (subindex = 0; subindex < SAMPLES_PER_SUBBAND; subindex++) {
        for (i = 0; i < s->subband_activity[chans]; i++)
            raXin[i] = samples_in[i][subindex];
        for (k = 0; k < 32; k++) {
            A[k] = 0.0;
            for (i = 0; i < 32; i++)
                A[k] += (raXin[2 * i] + raXin[2 * i + 1]) * s->qmf64_table->dct4_coeff[k][i];
        }
        for (k = 0; k < 32; k++) {
            B[k] = raXin[0] * s->qmf64_table->dct2_coeff[k][0];
            for (i = 1; i < 32; i++)
                B[k] += (raXin[2 * i] + raXin[2 * i - 1]) * s->qmf64_table->dct2_coeff[k][i];
        }
        for (k = 0; k < 32; k++) {
            raX[k]      = s->qmf64_table->rcos[k] * (A[k] + B[k]);
            raX[63 - k] = s->qmf64_table->rsin[k] * (A[k] - B[k]);
        }
        for (i = 0; i < 64; i++) {
            float out = raZ[i];
            for (j = 0; j < 1024; j += 128)
                out += ff_dca_fir_64bands[j + i] * (raX[j + i] - raX[j + 63 - i]);
            *samples_out++ = out * scale;
        }
        for (i = 0; i < 64; i++) {
            float hist = 0.0;
            for (j = 0; j < 1024; j += 128)
                hist += ff_dca_fir_64bands[64 + j + i] * (-raX[i + j] - raX[j + 63 - i]);
            raZ[i] = hist;
        }
        memmove(raX + 64, raX, (1024 - 64) * sizeof(*raX));
    }
}
['static int dca_filter_channels(DCAContext *s, int block_index, int upsample)\n{\n    float (*subband_samples)[DCA_SUBBANDS][SAMPLES_PER_SUBBAND] = s->subband_samples[block_index];\n    int k;\n    if (upsample) {\n        if (!s->qmf64_table) {\n            s->qmf64_table = qmf64_precompute();\n            if (!s->qmf64_table)\n                return AVERROR(ENOMEM);\n        }\n        for (k = 0; k < s->prim_channels; k++) {\n            if (s->channel_order_tab[k] >= 0)\n                qmf_64_subbands(s, k, subband_samples[k],\n                                s->samples_chanptr[s->channel_order_tab[k]],\n                                M_SQRT2 / 32768.0);\n        }\n    } else {\n        for (k = 0; k < s->prim_channels; k++) {\n            if (s->channel_order_tab[k] >= 0)\n                qmf_32_subbands(s, k, subband_samples[k],\n                                s->samples_chanptr[s->channel_order_tab[k]],\n                                M_SQRT1_2 / 32768.0);\n        }\n    }\n    if (s->lfe) {\n        float *samples = s->samples_chanptr[ff_dca_lfe_index[s->amode]];\n        lfe_interpolation_fir(s,\n                              s->lfe_data + 2 * s->lfe * (block_index + 4),\n                              samples);\n        if (upsample) {\n            unsigned i;\n            for (i = 511; i > 0; i--) {\n                samples[2 * i]     =\n                samples[2 * i + 1] = samples[i];\n            }\n            samples[1] = samples[0];\n        }\n    }\n    if (s->prim_channels + !!s->lfe > 2 &&\n        s->avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {\n        dca_downmix(s->samples_chanptr, s->amode, !!s->lfe, s->downmix_coef,\n                    s->channel_order_tab);\n    }\n    return 0;\n}', 'static void qmf_64_subbands(DCAContext *s, int chans, float samples_in[64][SAMPLES_PER_SUBBAND],\n                            float *samples_out, float scale)\n{\n    float raXin[64];\n    float A[32], B[32];\n    float *raX = s->subband_fir_hist[chans];\n    float *raZ = s->subband_fir_noidea[chans];\n    unsigned i, j, k, subindex;\n    for (i = s->subband_activity[chans]; i < 64; i++)\n        raXin[i] = 0.0;\n    for (subindex = 0; subindex < SAMPLES_PER_SUBBAND; subindex++) {\n        for (i = 0; i < s->subband_activity[chans]; i++)\n            raXin[i] = samples_in[i][subindex];\n        for (k = 0; k < 32; k++) {\n            A[k] = 0.0;\n            for (i = 0; i < 32; i++)\n                A[k] += (raXin[2 * i] + raXin[2 * i + 1]) * s->qmf64_table->dct4_coeff[k][i];\n        }\n        for (k = 0; k < 32; k++) {\n            B[k] = raXin[0] * s->qmf64_table->dct2_coeff[k][0];\n            for (i = 1; i < 32; i++)\n                B[k] += (raXin[2 * i] + raXin[2 * i - 1]) * s->qmf64_table->dct2_coeff[k][i];\n        }\n        for (k = 0; k < 32; k++) {\n            raX[k]      = s->qmf64_table->rcos[k] * (A[k] + B[k]);\n            raX[63 - k] = s->qmf64_table->rsin[k] * (A[k] - B[k]);\n        }\n        for (i = 0; i < 64; i++) {\n            float out = raZ[i];\n            for (j = 0; j < 1024; j += 128)\n                out += ff_dca_fir_64bands[j + i] * (raX[j + i] - raX[j + 63 - i]);\n            *samples_out++ = out * scale;\n        }\n        for (i = 0; i < 64; i++) {\n            float hist = 0.0;\n            for (j = 0; j < 1024; j += 128)\n                hist += ff_dca_fir_64bands[64 + j + i] * (-raX[i + j] - raX[j + 63 - i]);\n            raZ[i] = hist;\n        }\n        memmove(raX + 64, raX, (1024 - 64) * sizeof(*raX));\n    }\n}']