libavcodec/h264.c:1310: error: Buffer Overrun L3
  Offset: [-12, +oo] Size: 32 by call to `hl_decode_mb_internal`.

libavcodec/h264.c:1310:5: Call
1308.  */
1309. static void av_noinline hl_decode_mb_complex(H264Context *h){
1310.     hl_decode_mb_internal(h, 0);
          ^
1311. }
1312. 

libavcodec/h264.c:1042:1: Global `ff_h264_chroma_qp`
  1040. }
  1041. 
  1042. static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){
        ^
  1043.     MpegEncContext * const s = &h->s;
  1044.     const int mb_x= s->mb_x;

libavcodec/h264.c:1276:29: Call
  1274.                         if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){
  1275.                             uint8_t * const ptr= dest[(i&4)>>2] + block_offset[i];
  1276.                             ff_svq3_add_idct_c(ptr, h->mb + i*16, uvlinesize, ff_h264_chroma_qp[s->qscale + 12] - 12, 2);
                                    ^
  1277.                         }
  1278.                     }

libavcodec/svq3.c:166:1: <Offset trace>
164. #undef stride
165. 
166. void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
     ^
167.                             int dc)
168. {

libavcodec/svq3.c:166:1: Parameter `qp`
    164. #undef stride
    165. 
    166. void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
         ^
    167.                             int dc)
    168. {

libavcodec/svq3.c:121:1: <Length trace>
119. };
120. 
121. static const uint32_t svq3_dequant_coeff[32] = {
     ^
122.      3881,  4351,  4890,  5481,  6154,  6914,  7761,  8718,
123.      9781, 10987, 12339, 13828, 15523, 17435, 19561, 21873,

libavcodec/svq3.c:121:1: Array declaration
    119. };
    120. 
    121. static const uint32_t svq3_dequant_coeff[32] = {
         ^
    122.      3881,  4351,  4890,  5481,  6154,  6914,  7761,  8718,
    123.      9781, 10987, 12339, 13828, 15523, 17435, 19561, 21873,

libavcodec/svq3.c:169:22: Array access: Offset: [-12, +oo] Size: 32 by call to `hl_decode_mb_internal` 
    167.                             int dc)
    168. {
    169.     const int qmul = svq3_dequant_coeff[qp];
                              ^
    170.     int i;
    171.     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;

void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
                            int dc)
{
    const int qmul = svq3_dequant_coeff[qp];
    int i;
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
    if (dc) {
        dc = 13*13*((dc == 1) ? 1538*block[0] : ((qmul*(block[0] >> 3)) / 2));
        block[0] = 0;
    }
    for (i = 0; i < 4; i++) {
        const int z0 = 13*(block[0 + 4*i] +    block[2 + 4*i]);
        const int z1 = 13*(block[0 + 4*i] -    block[2 + 4*i]);
        const int z2 =  7* block[1 + 4*i] - 17*block[3 + 4*i];
        const int z3 = 17* block[1 + 4*i] +  7*block[3 + 4*i];
        block[0 + 4*i] = z0 + z3;
        block[1 + 4*i] = z1 + z2;
        block[2 + 4*i] = z1 - z2;
        block[3 + 4*i] = z0 - z3;
    }
    for (i = 0; i < 4; i++) {
        const int z0 = 13*(block[i + 4*0] +    block[i + 4*2]);
        const int z1 = 13*(block[i + 4*0] -    block[i + 4*2]);
        const int z2 =  7* block[i + 4*1] - 17*block[i + 4*3];
        const int z3 = 17* block[i + 4*1] +  7*block[i + 4*3];
        const int rr = (dc + 0x80000);
        dst[i + stride*0] = cm[ dst[i + stride*0] + (((z0 + z3)*qmul + rr) >> 20) ];
        dst[i + stride*1] = cm[ dst[i + stride*1] + (((z1 + z2)*qmul + rr) >> 20) ];
        dst[i + stride*2] = cm[ dst[i + stride*2] + (((z1 - z2)*qmul + rr) >> 20) ];
        dst[i + stride*3] = cm[ dst[i + stride*3] + (((z0 - z3)*qmul + rr) >> 20) ];
    }
}
['static void av_noinline hl_decode_mb_complex(H264Context *h){\n    hl_decode_mb_internal(h, 0);\n}', 'static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){\n    MpegEncContext * const s = &h->s;\n    const int mb_x= s->mb_x;\n    const int mb_y= s->mb_y;\n    const int mb_xy= h->mb_xy;\n    const int mb_type= s->current_picture.mb_type[mb_xy];\n    uint8_t  *dest_y, *dest_cb, *dest_cr;\n    int linesize, uvlinesize  ;\n    int i;\n    int *block_offset = &h->block_offset[0];\n    const int transform_bypass = !simple && (s->qscale == 0 && h->sps.transform_bypass);\n    const int is_h264 = !CONFIG_SVQ3_DECODER || simple || s->codec_id == CODEC_ID_H264;\n    void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride);\n    void (*idct_dc_add)(uint8_t *dst, DCTELEM *block, int stride);\n    dest_y  = s->current_picture.data[0] + (mb_x + mb_y * s->linesize  ) * 16;\n    dest_cb = s->current_picture.data[1] + (mb_x + mb_y * s->uvlinesize) * 8;\n    dest_cr = s->current_picture.data[2] + (mb_x + mb_y * s->uvlinesize) * 8;\n    s->dsp.prefetch(dest_y + (s->mb_x&3)*4*s->linesize + 64, s->linesize, 4);\n    s->dsp.prefetch(dest_cb + (s->mb_x&7)*s->uvlinesize + 64, dest_cr - dest_cb, 2);\n    h->list_counts[mb_xy]= h->list_count;\n    if (!simple && MB_FIELD) {\n        linesize   = h->mb_linesize   = s->linesize * 2;\n        uvlinesize = h->mb_uvlinesize = s->uvlinesize * 2;\n        block_offset = &h->block_offset[24];\n        if(mb_y&1){\n            dest_y -= s->linesize*15;\n            dest_cb-= s->uvlinesize*7;\n            dest_cr-= s->uvlinesize*7;\n        }\n        if(FRAME_MBAFF) {\n            int list;\n            for(list=0; list<h->list_count; list++){\n                if(!USES_LIST(mb_type, list))\n                    continue;\n                if(IS_16X16(mb_type)){\n                    int8_t *ref = &h->ref_cache[list][scan8[0]];\n                    fill_rectangle(ref, 4, 4, 8, (16+*ref)^(s->mb_y&1), 1);\n                }else{\n                    for(i=0; i<16; i+=4){\n                        int ref = h->ref_cache[list][scan8[i]];\n                        if(ref >= 0)\n                            fill_rectangle(&h->ref_cache[list][scan8[i]], 2, 2, 8, (16+ref)^(s->mb_y&1), 1);\n                    }\n                }\n            }\n        }\n    } else {\n        linesize   = h->mb_linesize   = s->linesize;\n        uvlinesize = h->mb_uvlinesize = s->uvlinesize;\n    }\n    if (!simple && IS_INTRA_PCM(mb_type)) {\n        for (i=0; i<16; i++) {\n            memcpy(dest_y + i*  linesize, h->mb       + i*8, 16);\n        }\n        for (i=0; i<8; i++) {\n            memcpy(dest_cb+ i*uvlinesize, h->mb + 128 + i*4,  8);\n            memcpy(dest_cr+ i*uvlinesize, h->mb + 160 + i*4,  8);\n        }\n    } else {\n        if(IS_INTRA(mb_type)){\n            if(h->deblocking_filter)\n                xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 1, simple);\n            if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){\n                h->hpc.pred8x8[ h->chroma_pred_mode ](dest_cb, uvlinesize);\n                h->hpc.pred8x8[ h->chroma_pred_mode ](dest_cr, uvlinesize);\n            }\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 = s->dsp.h264_idct8_dc_add;\n                            idct_add    = s->dsp.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, linesize);\n                            }else{\n                                const int nnz = h->non_zero_count_cache[ scan8[i] ];\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 && h->mb[i*16])\n                                        idct_dc_add(ptr, h->mb + i*16, linesize);\n                                    else\n                                        idct_add   (ptr, h->mb + i*16, 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 = s->dsp.h264_idct_dc_add;\n                            idct_add    = s->dsp.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, linesize);\n                            }else{\n                                uint8_t *topright;\n                                int nnz, tr;\n                                if(dir == DIAG_DOWN_LEFT_PRED || dir == VERT_LEFT_PRED){\n                                    const int topright_avail= (h->topright_samples_available<<i)&0x8000;\n                                    assert(mb_y || linesize <= block_offset[i]);\n                                    if(!topright_avail){\n                                        tr= ptr[3 - linesize]*0x01010101;\n                                        topright= (uint8_t*) &tr;\n                                    }else\n                                        topright= ptr + 4 - linesize;\n                                }else\n                                    topright= NULL;\n                                h->hpc.pred4x4[ dir ](ptr, topright, linesize);\n                                nnz = h->non_zero_count_cache[ scan8[i] ];\n                                if(nnz){\n                                    if(is_h264){\n                                        if(nnz == 1 && h->mb[i*16])\n                                            idct_dc_add(ptr, h->mb + i*16, linesize);\n                                        else\n                                            idct_add   (ptr, h->mb + i*16, linesize);\n                                    }else\n                                        ff_svq3_add_idct_c(ptr, h->mb + i*16, linesize, s->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(!transform_bypass)\n                        h264_luma_dc_dequant_idct_c(h->mb, s->qscale, h->dequant4_coeff[0][s->qscale][0]);\n                }else\n                    ff_svq3_luma_dc_dequant_idct_c(h->mb, s->qscale);\n            }\n            if(h->deblocking_filter)\n                xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0, simple);\n        }else if(is_h264){\n            hl_motion(h, dest_y, dest_cb, dest_cr,\n                      s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab,\n                      s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab,\n                      s->dsp.weight_h264_pixels_tab, s->dsp.biweight_h264_pixels_tab);\n        }\n        if(!IS_INTRA4x4(mb_type)){\n            if(is_h264){\n                if(IS_INTRA16x16(mb_type)){\n                    if(transform_bypass){\n                        if(h->sps.profile_idc==244 && (h->intra16x16_pred_mode==VERT_PRED8x8 || h->intra16x16_pred_mode==HOR_PRED8x8)){\n                            h->hpc.pred16x16_add[h->intra16x16_pred_mode](dest_y, block_offset, h->mb, linesize);\n                        }else{\n                            for(i=0; i<16; i++){\n                                if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16])\n                                    s->dsp.add_pixels4(dest_y + block_offset[i], h->mb + i*16, linesize);\n                            }\n                        }\n                    }else{\n                         s->dsp.h264_idct_add16intra(dest_y, block_offset, h->mb, linesize, h->non_zero_count_cache);\n                    }\n                }else if(h->cbp&15){\n                    if(transform_bypass){\n                        const int di = IS_8x8DCT(mb_type) ? 4 : 1;\n                        idct_add= IS_8x8DCT(mb_type) ? s->dsp.add_pixels8 : s->dsp.add_pixels4;\n                        for(i=0; i<16; i+=di){\n                            if(h->non_zero_count_cache[ scan8[i] ]){\n                                idct_add(dest_y + block_offset[i], h->mb + i*16, linesize);\n                            }\n                        }\n                    }else{\n                        if(IS_8x8DCT(mb_type)){\n                            s->dsp.h264_idct8_add4(dest_y, block_offset, h->mb, linesize, h->non_zero_count_cache);\n                        }else{\n                            s->dsp.h264_idct_add16(dest_y, block_offset, h->mb, linesize, h->non_zero_count_cache);\n                        }\n                    }\n                }\n            }else{\n                for(i=0; i<16; i++){\n                    if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){\n                        uint8_t * const ptr= dest_y + block_offset[i];\n                        ff_svq3_add_idct_c(ptr, h->mb + i*16, linesize, s->qscale, IS_INTRA(mb_type) ? 1 : 0);\n                    }\n                }\n            }\n        }\n        if((simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)) && (h->cbp&0x30)){\n            uint8_t *dest[2] = {dest_cb, dest_cr};\n            if(transform_bypass){\n                if(IS_INTRA(mb_type) && h->sps.profile_idc==244 && (h->chroma_pred_mode==VERT_PRED8x8 || h->chroma_pred_mode==HOR_PRED8x8)){\n                    h->hpc.pred8x8_add[h->chroma_pred_mode](dest[0], block_offset + 16, h->mb + 16*16, uvlinesize);\n                    h->hpc.pred8x8_add[h->chroma_pred_mode](dest[1], block_offset + 20, h->mb + 20*16, uvlinesize);\n                }else{\n                    idct_add = s->dsp.add_pixels4;\n                    for(i=16; i<16+8; i++){\n                        if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16])\n                            idct_add   (dest[(i&4)>>2] + block_offset[i], h->mb + i*16, uvlinesize);\n                    }\n                }\n            }else{\n                chroma_dc_dequant_idct_c(h->mb + 16*16, h->chroma_qp[0], h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]);\n                chroma_dc_dequant_idct_c(h->mb + 16*16+4*16, h->chroma_qp[1], h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]);\n                if(is_h264){\n                    idct_add = s->dsp.h264_idct_add;\n                    idct_dc_add = s->dsp.h264_idct_dc_add;\n                    for(i=16; i<16+8; i++){\n                        if(h->non_zero_count_cache[ scan8[i] ])\n                            idct_add   (dest[(i&4)>>2] + block_offset[i], h->mb + i*16, uvlinesize);\n                        else if(h->mb[i*16])\n                            idct_dc_add(dest[(i&4)>>2] + block_offset[i], h->mb + i*16, uvlinesize);\n                    }\n                }else{\n                    for(i=16; i<16+8; i++){\n                        if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){\n                            uint8_t * const ptr= dest[(i&4)>>2] + block_offset[i];\n                            ff_svq3_add_idct_c(ptr, h->mb + i*16, uvlinesize, ff_h264_chroma_qp[s->qscale + 12] - 12, 2);\n                        }\n                    }\n                }\n            }\n        }\n    }\n    if(h->cbp || IS_INTRA(mb_type))\n        s->dsp.clear_blocks(h->mb);\n    if(h->deblocking_filter && 0) {\n        backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple);\n        fill_filter_caches(h, mb_type);\n        h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]);\n        h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]);\n        if (!simple && FRAME_MBAFF) {\n            ff_h264_filter_mb     (h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize);\n        } else {\n            ff_h264_filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize);\n        }\n    }\n}', 'void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,\n                            int dc)\n{\n    const int qmul = svq3_dequant_coeff[qp];\n    int i;\n    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\n    if (dc) {\n        dc = 13*13*((dc == 1) ? 1538*block[0] : ((qmul*(block[0] >> 3)) / 2));\n        block[0] = 0;\n    }\n    for (i = 0; i < 4; i++) {\n        const int z0 = 13*(block[0 + 4*i] +    block[2 + 4*i]);\n        const int z1 = 13*(block[0 + 4*i] -    block[2 + 4*i]);\n        const int z2 =  7* block[1 + 4*i] - 17*block[3 + 4*i];\n        const int z3 = 17* block[1 + 4*i] +  7*block[3 + 4*i];\n        block[0 + 4*i] = z0 + z3;\n        block[1 + 4*i] = z1 + z2;\n        block[2 + 4*i] = z1 - z2;\n        block[3 + 4*i] = z0 - z3;\n    }\n    for (i = 0; i < 4; i++) {\n        const int z0 = 13*(block[i + 4*0] +    block[i + 4*2]);\n        const int z1 = 13*(block[i + 4*0] -    block[i + 4*2]);\n        const int z2 =  7* block[i + 4*1] - 17*block[i + 4*3];\n        const int z3 = 17* block[i + 4*1] +  7*block[i + 4*3];\n        const int rr = (dc + 0x80000);\n        dst[i + stride*0] = cm[ dst[i + stride*0] + (((z0 + z3)*qmul + rr) >> 20) ];\n        dst[i + stride*1] = cm[ dst[i + stride*1] + (((z1 + z2)*qmul + rr) >> 20) ];\n        dst[i + stride*2] = cm[ dst[i + stride*2] + (((z1 - z2)*qmul + rr) >> 20) ];\n        dst[i + stride*3] = cm[ dst[i + stride*3] + (((z0 - z3)*qmul + rr) >> 20) ];\n    }\n}']