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

libavcodec/h264.c:1742:1: Parameter `p`
1740. }
1741. 
1742. static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, int mb_type, int is_h264, int simple, int transform_bypass,
      ^
1743.                                                        int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p)
1744. {

libavcodec/h264.c:1841:13: Call
1839.             }
1840.         } else if (CONFIG_SVQ3_DECODER)
1841.             ff_svq3_luma_dc_dequant_idct_c(h->mb+p*256, h->mb_luma_dc[p], qscale);
                  ^
1842.     }
1843. }

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

libavcodec/svq3.c:144:9: Assignment
  142.     static const uint8_t x_offset[4]={0, 1*stride, 4*stride, 5*stride};
  143. 
  144.     for(i=0; i<4; i++){
               ^
  145.         const int z0 = 13*(input[4*i+0] +    input[4*i+2]);
  146.         const int z1 = 13*(input[4*i+0] -    input[4*i+2]);

libavcodec/svq3.c:137:1: <Length trace>
135. };
136. 
137. void ff_svq3_luma_dc_dequant_idct_c(DCTELEM *output, DCTELEM *input, int qp){
     ^
138.     const int qmul = svq3_dequant_coeff[qp];
139. #define stride 16

libavcodec/svq3.c:137:1: Parameter `*input`
  135. };
  136. 
  137. void ff_svq3_luma_dc_dequant_idct_c(DCTELEM *output, DCTELEM *input, int qp){
       ^
  138.     const int qmul = svq3_dequant_coeff[qp];
  139. #define stride 16

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

void ff_svq3_luma_dc_dequant_idct_c(DCTELEM *output, DCTELEM *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, int mb_type, int is_h264, int simple, int transform_bypass,\n                                                       int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p)\n{\n    MpegEncContext * const s = &h->s;\n    void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride);\n    void (*idct_dc_add)(uint8_t *dst, DCTELEM *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), h->mb_luma_dc[p], h->dequant4_coeff[p][qscale][0]);\n                else{\n                    static const uint8_t dc_mapping[16] = { 0*16, 1*16, 4*16, 5*16, 2*16, 3*16, 6*16, 7*16,\n                                                            8*16, 9*16,12*16,13*16,10*16,11*16,14*16,15*16};\n                    for(i = 0; i < 16; i++)\n                        dctcoef_set(h->mb+(p*256 << pixel_shift), pixel_shift, dc_mapping[i], dctcoef_get(h->mb_luma_dc[p], pixel_shift, i));\n                }\n            }\n        } else if (CONFIG_SVQ3_DECODER)\n            ff_svq3_luma_dc_dequant_idct_c(h->mb+p*256, h->mb_luma_dc[p], qscale);\n    }\n}', 'void ff_svq3_luma_dc_dequant_idct_c(DCTELEM *output, DCTELEM *input, int qp){\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}']