libavcodec/cavs.c:473: error: Buffer Overrun L2
  Offset: [1, 16] (⇐ 1 + [0, 15]) Size: 2 by call to `mc_part_std`.

libavcodec/cavs.c:464:1: Parameter `h->cdsp.put_cavs_qpel_pixels_tab[*]`
462. }
463. 
464. void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type) {
     ^
465.     if(ff_cavs_partition_flags[mb_type] == 0){ // 16x16
466.         mc_part_std(h, 8, 0, h->cy, h->cu, h->cv, 0, 0,

libavcodec/cavs.c:473:9: Call
471.                 &h->mv[MV_FWD_X0]);
472.     }else{
473.         mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 0, 0,
             ^
474.                 h->cdsp.put_cavs_qpel_pixels_tab[1],
475.                 h->h264chroma.put_h264_chroma_pixels_tab[1],

libavcodec/cavs.c:431:1: Parameter `*qpix_put`
  429. }
  430. 
  431. static inline void mc_part_std(AVSContext *h,int chroma_height,int delta,
       ^
  432.                                uint8_t *dest_y,uint8_t *dest_cb,uint8_t *dest_cr,
  433.                                int x_offset, int y_offset,qpel_mc_func *qpix_put,

libavcodec/cavs.c:437:5: Assignment
  435.                                h264_chroma_mc_func chroma_avg, cavs_vector *mv)
  436. {
  437.     qpel_mc_func *qpix_op=  qpix_put;
           ^
  438.     h264_chroma_mc_func chroma_op= chroma_put;
  439. 

libavcodec/cavs.c:448:9: Call
  446.     if(mv->ref >= 0){
  447.         AVFrame *ref = h->DPB[mv->ref].f;
  448.         mc_dir_part(h, ref, chroma_height, delta, 0,
               ^
  449.                     dest_y, dest_cb, dest_cr, x_offset, y_offset,
  450.                     qpix_op, chroma_op, mv);

libavcodec/cavs.c:379:1: <Offset trace>
377.  ****************************************************************************/
378. 
379. static inline void mc_dir_part(AVSContext *h, AVFrame *pic,
     ^
380.                                int chroma_height,int delta,int list,uint8_t *dest_y,
381.                                uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset,

libavcodec/cavs.c:379:1: Parameter `src_x_offset`
    377.  ****************************************************************************/
    378. 
    379. static inline void mc_dir_part(AVSContext *h, AVFrame *pic,
         ^
    380.                                int chroma_height,int delta,int list,uint8_t *dest_y,
    381.                                uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset,

libavcodec/cavs.c:385:5: Assignment
    383.                                h264_chroma_mc_func chroma_op,cavs_vector *mv)
    384. {
    385.     const int mx= mv->x + src_x_offset*8;
             ^
    386.     const int my= mv->y + src_y_offset*8;
    387.     const int luma_xy= (mx&3) + ((my&3)<<2);

libavcodec/cavs.c:387:5: Assignment
    385.     const int mx= mv->x + src_x_offset*8;
    386.     const int my= mv->y + src_y_offset*8;
    387.     const int luma_xy= (mx&3) + ((my&3)<<2);
             ^
    388.     uint8_t * src_y  = pic->data[0] + (mx >> 2) + (my >> 2) * h->l_stride;
    389.     uint8_t * src_cb = pic->data[1] + (mx >> 3) + (my >> 3) * h->c_stride;

libavcodec/cavs.c:379:1: <Length trace>
377.  ****************************************************************************/
378. 
379. static inline void mc_dir_part(AVSContext *h, AVFrame *pic,
     ^
380.                                int chroma_height,int delta,int list,uint8_t *dest_y,
381.                                uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset,

libavcodec/cavs.c:379:1: Parameter `*qpix_op`
    377.  ****************************************************************************/
    378. 
    379. static inline void mc_dir_part(AVSContext *h, AVFrame *pic,
         ^
    380.                                int chroma_height,int delta,int list,uint8_t *dest_y,
    381.                                uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset,

libavcodec/cavs.c:414:5: Array access: Offset: [1, 16] (⇐ 1 + [0, 15]) Size: 2 by call to `mc_part_std` 
    412.     }
    413. 
    414.     qpix_op[luma_xy](dest_y, src_y, h->l_stride); //FIXME try variable height perhaps?
             ^
    415. 
    416.     if(emu){

static inline void mc_dir_part(AVSContext *h, AVFrame *pic,
                               int chroma_height,int delta,int list,uint8_t *dest_y,
                               uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset,
                               int src_y_offset,qpel_mc_func *qpix_op,
                               h264_chroma_mc_func chroma_op,cavs_vector *mv)
{
    const int mx= mv->x + src_x_offset*8;
    const int my= mv->y + src_y_offset*8;
    const int luma_xy= (mx&3) + ((my&3)<<2);
    uint8_t * src_y  = pic->data[0] + (mx >> 2) + (my >> 2) * h->l_stride;
    uint8_t * src_cb = pic->data[1] + (mx >> 3) + (my >> 3) * h->c_stride;
    uint8_t * src_cr = pic->data[2] + (mx >> 3) + (my >> 3) * h->c_stride;
    int extra_width = 0;
    int extra_height= extra_width;
    int emu=0;
    const int full_mx= mx>>2;
    const int full_my= my>>2;
    const int pic_width  = 16*h->mb_width;
    const int pic_height = 16*h->mb_height;
    if (!pic->data[0])
        return;
    if(mx&7) extra_width -= 3;
    if(my&7) extra_height -= 3;
    if(   full_mx < 0-extra_width
          || full_my < 0-extra_height
          || full_mx + 16  > pic_width + extra_width
          || full_my + 16  > pic_height + extra_height){
        h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_y - 2 - 2*h->l_stride, h->l_stride,
                            16+5, 16+5 , full_mx-2, full_my-2, pic_width, pic_height);
        src_y= h->edge_emu_buffer + 2 + 2*h->l_stride;
        emu=1;
    }
    qpix_op[luma_xy](dest_y, src_y, h->l_stride);
    if(emu){
        h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cb, h->c_stride,
                            9, 9 , (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
        src_cb= h->edge_emu_buffer;
    }
    chroma_op(dest_cb, src_cb, h->c_stride, chroma_height, mx&7, my&7);
    if(emu){
        h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cr, h->c_stride,
                            9, 9 , (mx>>3), (my>>3), pic_width>>1, pic_height>>1);
        src_cr= h->edge_emu_buffer;
    }
    chroma_op(dest_cr, src_cr, h->c_stride, chroma_height, mx&7, my&7);
}
['void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type) {\n    if(ff_cavs_partition_flags[mb_type] == 0){\n        mc_part_std(h, 8, 0, h->cy, h->cu, h->cv, 0, 0,\n                h->cdsp.put_cavs_qpel_pixels_tab[0],\n                h->h264chroma.put_h264_chroma_pixels_tab[0],\n                h->cdsp.avg_cavs_qpel_pixels_tab[0],\n                h->h264chroma.avg_h264_chroma_pixels_tab[0],\n                &h->mv[MV_FWD_X0]);\n    }else{\n        mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 0, 0,\n                h->cdsp.put_cavs_qpel_pixels_tab[1],\n                h->h264chroma.put_h264_chroma_pixels_tab[1],\n                h->cdsp.avg_cavs_qpel_pixels_tab[1],\n                h->h264chroma.avg_h264_chroma_pixels_tab[1],\n                &h->mv[MV_FWD_X0]);\n        mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 4, 0,\n                h->cdsp.put_cavs_qpel_pixels_tab[1],\n                h->h264chroma.put_h264_chroma_pixels_tab[1],\n                h->cdsp.avg_cavs_qpel_pixels_tab[1],\n                h->h264chroma.avg_h264_chroma_pixels_tab[1],\n                &h->mv[MV_FWD_X1]);\n        mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 0, 4,\n                h->cdsp.put_cavs_qpel_pixels_tab[1],\n                h->h264chroma.put_h264_chroma_pixels_tab[1],\n                h->cdsp.avg_cavs_qpel_pixels_tab[1],\n                h->h264chroma.avg_h264_chroma_pixels_tab[1],\n                &h->mv[MV_FWD_X2]);\n        mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 4, 4,\n                h->cdsp.put_cavs_qpel_pixels_tab[1],\n                h->h264chroma.put_h264_chroma_pixels_tab[1],\n                h->cdsp.avg_cavs_qpel_pixels_tab[1],\n                h->h264chroma.avg_h264_chroma_pixels_tab[1],\n                &h->mv[MV_FWD_X3]);\n    }\n}', 'static inline void mc_part_std(AVSContext *h,int chroma_height,int delta,\n                               uint8_t *dest_y,uint8_t *dest_cb,uint8_t *dest_cr,\n                               int x_offset, int y_offset,qpel_mc_func *qpix_put,\n                               h264_chroma_mc_func chroma_put,qpel_mc_func *qpix_avg,\n                               h264_chroma_mc_func chroma_avg, cavs_vector *mv)\n{\n    qpel_mc_func *qpix_op=  qpix_put;\n    h264_chroma_mc_func chroma_op= chroma_put;\n    dest_y  += 2*x_offset + 2*y_offset*h->l_stride;\n    dest_cb +=   x_offset +   y_offset*h->c_stride;\n    dest_cr +=   x_offset +   y_offset*h->c_stride;\n    x_offset += 8*h->mbx;\n    y_offset += 8*h->mby;\n    if(mv->ref >= 0){\n        AVFrame *ref = h->DPB[mv->ref].f;\n        mc_dir_part(h, ref, chroma_height, delta, 0,\n                    dest_y, dest_cb, dest_cr, x_offset, y_offset,\n                    qpix_op, chroma_op, mv);\n        qpix_op=  qpix_avg;\n        chroma_op= chroma_avg;\n    }\n    if((mv+MV_BWD_OFFS)->ref >= 0){\n        AVFrame *ref = h->DPB[0].f;\n        mc_dir_part(h, ref, chroma_height, delta, 1,\n                    dest_y, dest_cb, dest_cr, x_offset, y_offset,\n                    qpix_op, chroma_op, mv+MV_BWD_OFFS);\n    }\n}', 'static inline void mc_dir_part(AVSContext *h, AVFrame *pic,\n                               int chroma_height,int delta,int list,uint8_t *dest_y,\n                               uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset,\n                               int src_y_offset,qpel_mc_func *qpix_op,\n                               h264_chroma_mc_func chroma_op,cavs_vector *mv)\n{\n    const int mx= mv->x + src_x_offset*8;\n    const int my= mv->y + src_y_offset*8;\n    const int luma_xy= (mx&3) + ((my&3)<<2);\n    uint8_t * src_y  = pic->data[0] + (mx >> 2) + (my >> 2) * h->l_stride;\n    uint8_t * src_cb = pic->data[1] + (mx >> 3) + (my >> 3) * h->c_stride;\n    uint8_t * src_cr = pic->data[2] + (mx >> 3) + (my >> 3) * h->c_stride;\n    int extra_width = 0;\n    int extra_height= extra_width;\n    int emu=0;\n    const int full_mx= mx>>2;\n    const int full_my= my>>2;\n    const int pic_width  = 16*h->mb_width;\n    const int pic_height = 16*h->mb_height;\n    if (!pic->data[0])\n        return;\n    if(mx&7) extra_width -= 3;\n    if(my&7) extra_height -= 3;\n    if(   full_mx < 0-extra_width\n          || full_my < 0-extra_height\n          || full_mx + 16  > pic_width + extra_width\n          || full_my + 16  > pic_height + extra_height){\n        h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_y - 2 - 2*h->l_stride, h->l_stride,\n                            16+5, 16+5 , full_mx-2, full_my-2, pic_width, pic_height);\n        src_y= h->edge_emu_buffer + 2 + 2*h->l_stride;\n        emu=1;\n    }\n    qpix_op[luma_xy](dest_y, src_y, h->l_stride);\n    if(emu){\n        h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cb, h->c_stride,\n                            9, 9 , (mx>>3), (my>>3), pic_width>>1, pic_height>>1);\n        src_cb= h->edge_emu_buffer;\n    }\n    chroma_op(dest_cb, src_cb, h->c_stride, chroma_height, mx&7, my&7);\n    if(emu){\n        h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cr, h->c_stride,\n                            9, 9 , (mx>>3), (my>>3), pic_width>>1, pic_height>>1);\n        src_cr= h->edge_emu_buffer;\n    }\n    chroma_op(dest_cr, src_cr, h->c_stride, chroma_height, mx&7, my&7);\n}']