libavcodec/h264.c:1884: error: Buffer Overrun L2
  Offset: [3+min(0, `p`), 15+max(0, `p`)] (⇐ [min(0, `p`), max(0, `p`)] + [3, 15]) Size: 3 by call to `ff_svq3_luma_dc_dequant_idct_c`.

libavcodec/h264.c:1771:1: Parameter `p`
1769. }
1770. 
1771. static av_always_inline void hl_decode_mb_predict_luma(H264Context *h,
      ^
1772.                                                        int mb_type, int is_h264,
1773.                                                        int simple,

libavcodec/h264.c:1884:13: Call
1882.             }
1883.         } else if (CONFIG_SVQ3_DECODER)
1884.             ff_svq3_luma_dc_dequant_idct_c(h->mb + p * 256,
                  ^
1885.                                            h->mb_luma_dc[p], qscale);
1886.     }

libavcodec/svq3.c:148:10: <Offset trace>
146.     static const uint8_t x_offset[4] = { 0, 1 * stride, 4 * stride, 5 * stride };
147. 
148.     for (i = 0; i < 4; i++) {
              ^
149.         const int z0 = 13 * (input[4 * i + 0] +      input[4 * i + 2]);
150.         const int z1 = 13 * (input[4 * i + 0] -      input[4 * i + 2]);

libavcodec/svq3.c:148:10: Assignment
  146.     static const uint8_t x_offset[4] = { 0, 1 * stride, 4 * stride, 5 * stride };
  147. 
  148.     for (i = 0; i < 4; i++) {
                ^
  149.         const int z0 = 13 * (input[4 * i + 0] +      input[4 * i + 2]);
  150.         const int z1 = 13 * (input[4 * i + 0] -      input[4 * i + 2]);

libavcodec/svq3.c:140:1: <Length trace>
138. };
139. 
140. void ff_svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp)
     ^
141. {
142.     const int qmul = svq3_dequant_coeff[qp];

libavcodec/svq3.c:140:1: Parameter `*input`
  138. };
  139. 
  140. void ff_svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp)
       ^
  141. {
  142.     const int qmul = svq3_dequant_coeff[qp];

libavcodec/svq3.c:151:54: Array access: Offset: [3+min(0, p), 15+max(0, p)] (⇐ [min(0, p), max(0, p)] + [3, 15]) Size: 3 by call to `ff_svq3_luma_dc_dequant_idct_c` 
  149.         const int z0 = 13 * (input[4 * i + 0] +      input[4 * i + 2]);
  150.         const int z1 = 13 * (input[4 * i + 0] -      input[4 * i + 2]);
  151.         const int z2 =  7 *  input[4 * i + 1] - 17 * input[4 * i + 3];
                                                            ^
  152.         const int z3 = 17 *  input[4 * i + 1] +  7 * input[4 * i + 3];
  153. 

void ff_svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp)
{
    const int qmul = svq3_dequant_coeff[qp];
#define stride 16
    int i;
    int temp[16];
    static const uint8_t x_offset[4] = { 0, 1 * stride, 4 * stride, 5 * stride };
    for (i = 0; i < 4; i++) {
        const int z0 = 13 * (input[4 * i + 0] +      input[4 * i + 2]);
        const int z1 = 13 * (input[4 * i + 0] -      input[4 * i + 2]);
        const int z2 =  7 *  input[4 * i + 1] - 17 * input[4 * i + 3];
        const int z3 = 17 *  input[4 * i + 1] +  7 * input[4 * i + 3];
        temp[4 * i + 0] = z0 + z3;
        temp[4 * i + 1] = z1 + z2;
        temp[4 * i + 2] = z1 - z2;
        temp[4 * i + 3] = z0 - z3;
    }
    for (i = 0; i < 4; i++) {
        const int offset = x_offset[i];
        const int z0     = 13 * (temp[4 * 0 + i] +      temp[4 * 2 + i]);
        const int z1     = 13 * (temp[4 * 0 + i] -      temp[4 * 2 + i]);
        const int z2     =  7 *  temp[4 * 1 + i] - 17 * temp[4 * 3 + i];
        const int z3     = 17 *  temp[4 * 1 + i] +  7 * temp[4 * 3 + i];
        output[stride *  0 + offset] = (z0 + z3) * qmul + 0x80000 >> 20;
        output[stride *  2 + offset] = (z1 + z2) * qmul + 0x80000 >> 20;
        output[stride *  8 + offset] = (z1 - z2) * qmul + 0x80000 >> 20;
        output[stride * 10 + offset] = (z0 - z3) * qmul + 0x80000 >> 20;
    }
}
['static av_always_inline void hl_decode_mb_predict_luma(H264Context *h,\n                                                       int mb_type, int is_h264,\n                                                       int simple,\n                                                       int transform_bypass,\n                                                       int pixel_shift,\n                                                       int *block_offset,\n                                                       int linesize,\n                                                       uint8_t *dest_y, int p)\n{\n    MpegEncContext *const s = &h->s;\n    void (*idct_add)(uint8_t *dst, int16_t *block, int stride);\n    void (*idct_dc_add)(uint8_t *dst, int16_t *block, int stride);\n    int i;\n    int qscale = p == 0 ? s->qscale : h->chroma_qp[p - 1];\n    block_offset += 16 * p;\n    if (IS_INTRA4x4(mb_type)) {\n        if (simple || !s->encoding) {\n            if (IS_8x8DCT(mb_type)) {\n                if (transform_bypass) {\n                    idct_dc_add  =\n                    idct_add     = s->dsp.add_pixels8;\n                } else {\n                    idct_dc_add = h->h264dsp.h264_idct8_dc_add;\n                    idct_add    = h->h264dsp.h264_idct8_add;\n                }\n                for (i = 0; i < 16; i += 4) {\n                    uint8_t *const ptr = dest_y + block_offset[i];\n                    const int dir      = h->intra4x4_pred_mode_cache[scan8[i]];\n                    if (transform_bypass && h->sps.profile_idc == 244 && dir <= 1) {\n                        h->hpc.pred8x8l_add[dir](ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);\n                    } else {\n                        const int nnz = h->non_zero_count_cache[scan8[i + p * 16]];\n                        h->hpc.pred8x8l[dir](ptr, (h->topleft_samples_available << i) & 0x8000,\n                                             (h->topright_samples_available << i) & 0x4000, linesize);\n                        if (nnz) {\n                            if (nnz == 1 && dctcoef_get(h->mb, pixel_shift, i * 16 + p * 256))\n                                idct_dc_add(ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);\n                            else\n                                idct_add(ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);\n                        }\n                    }\n                }\n            } else {\n                if (transform_bypass) {\n                    idct_dc_add  =\n                        idct_add = s->dsp.add_pixels4;\n                } else {\n                    idct_dc_add = h->h264dsp.h264_idct_dc_add;\n                    idct_add    = h->h264dsp.h264_idct_add;\n                }\n                for (i = 0; i < 16; i++) {\n                    uint8_t *const ptr = dest_y + block_offset[i];\n                    const int dir      = h->intra4x4_pred_mode_cache[scan8[i]];\n                    if (transform_bypass && h->sps.profile_idc == 244 && dir <= 1) {\n                        h->hpc.pred4x4_add[dir](ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);\n                    } else {\n                        uint8_t *topright;\n                        int nnz, tr;\n                        uint64_t tr_high;\n                        if (dir == DIAG_DOWN_LEFT_PRED || dir == VERT_LEFT_PRED) {\n                            const int topright_avail = (h->topright_samples_available << i) & 0x8000;\n                            assert(s->mb_y || linesize <= block_offset[i]);\n                            if (!topright_avail) {\n                                if (pixel_shift) {\n                                    tr_high  = ((uint16_t *)ptr)[3 - linesize / 2] * 0x0001000100010001ULL;\n                                    topright = (uint8_t *)&tr_high;\n                                } else {\n                                    tr       = ptr[3 - linesize] * 0x01010101u;\n                                    topright = (uint8_t *)&tr;\n                                }\n                            } else\n                                topright = ptr + (4 << pixel_shift) - linesize;\n                        } else\n                            topright = NULL;\n                        h->hpc.pred4x4[dir](ptr, topright, linesize);\n                        nnz = h->non_zero_count_cache[scan8[i + p * 16]];\n                        if (nnz) {\n                            if (is_h264) {\n                                if (nnz == 1 && dctcoef_get(h->mb, pixel_shift, i * 16 + p * 256))\n                                    idct_dc_add(ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);\n                                else\n                                    idct_add(ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);\n                            } else if (CONFIG_SVQ3_DECODER)\n                                ff_svq3_add_idct_c(ptr, h->mb + i * 16 + p * 256, linesize, qscale, 0);\n                        }\n                    }\n                }\n            }\n        }\n    } else {\n        h->hpc.pred16x16[h->intra16x16_pred_mode](dest_y, linesize);\n        if (is_h264) {\n            if (h->non_zero_count_cache[scan8[LUMA_DC_BLOCK_INDEX + p]]) {\n                if (!transform_bypass)\n                    h->h264dsp.h264_luma_dc_dequant_idct(h->mb + (p * 256 << pixel_shift),\n                                                         h->mb_luma_dc[p],\n                                                         h->dequant4_coeff[p][qscale][0]);\n                else {\n                    static const uint8_t dc_mapping[16] = {\n                         0 * 16,  1 * 16,  4 * 16,  5 * 16,\n                         2 * 16,  3 * 16,  6 * 16,  7 * 16,\n                         8 * 16,  9 * 16, 12 * 16, 13 * 16,\n                        10 * 16, 11 * 16, 14 * 16, 15 * 16 };\n                    for (i = 0; i < 16; i++)\n                        dctcoef_set(h->mb + (p * 256 << pixel_shift),\n                                    pixel_shift, dc_mapping[i],\n                                    dctcoef_get(h->mb_luma_dc[p],\n                                                pixel_shift, i));\n                }\n            }\n        } else if (CONFIG_SVQ3_DECODER)\n            ff_svq3_luma_dc_dequant_idct_c(h->mb + p * 256,\n                                           h->mb_luma_dc[p], qscale);\n    }\n}', 'void ff_svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp)\n{\n    const int qmul = svq3_dequant_coeff[qp];\n#define stride 16\n    int i;\n    int temp[16];\n    static const uint8_t x_offset[4] = { 0, 1 * stride, 4 * stride, 5 * stride };\n    for (i = 0; i < 4; i++) {\n        const int z0 = 13 * (input[4 * i + 0] +      input[4 * i + 2]);\n        const int z1 = 13 * (input[4 * i + 0] -      input[4 * i + 2]);\n        const int z2 =  7 *  input[4 * i + 1] - 17 * input[4 * i + 3];\n        const int z3 = 17 *  input[4 * i + 1] +  7 * input[4 * i + 3];\n        temp[4 * i + 0] = z0 + z3;\n        temp[4 * i + 1] = z1 + z2;\n        temp[4 * i + 2] = z1 - z2;\n        temp[4 * i + 3] = z0 - z3;\n    }\n    for (i = 0; i < 4; i++) {\n        const int offset = x_offset[i];\n        const int z0     = 13 * (temp[4 * 0 + i] +      temp[4 * 2 + i]);\n        const int z1     = 13 * (temp[4 * 0 + i] -      temp[4 * 2 + i]);\n        const int z2     =  7 *  temp[4 * 1 + i] - 17 * temp[4 * 3 + i];\n        const int z3     = 17 *  temp[4 * 1 + i] +  7 * temp[4 * 3 + i];\n        output[stride *  0 + offset] = (z0 + z3) * qmul + 0x80000 >> 20;\n        output[stride *  2 + offset] = (z1 + z2) * qmul + 0x80000 >> 20;\n        output[stride *  8 + offset] = (z1 - z2) * qmul + 0x80000 >> 20;\n        output[stride * 10 + offset] = (z0 - z3) * qmul + 0x80000 >> 20;\n    }\n}']