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

libavcodec/cavs.c:482:1: Parameter `h->cdsp.put_cavs_qpel_pixels_tab[*]`
480. }
481. 
482. void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type)
     ^
483. {
484.     if (ff_cavs_partition_flags[mb_type] == 0) { // 16x16

libavcodec/cavs.c:492:9: Call
490.                     &h->mv[MV_FWD_X0]);
491.     } else {
492.         mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 0, 0,
             ^
493.                     h->cdsp.put_cavs_qpel_pixels_tab[1],
494.                     h->h264chroma.put_h264_chroma_pixels_tab[1],

libavcodec/cavs.c:444:1: Parameter `*qpix_put`
  442. }
  443. 
  444. static inline void mc_part_std(AVSContext *h, int chroma_height, int delta,
       ^
  445.                                uint8_t *dest_y,
  446.                                uint8_t *dest_cb,

libavcodec/cavs.c:455:5: Assignment
  453.                                cavs_vector *mv)
  454. {
  455.     qpel_mc_func *qpix_op =  qpix_put;
           ^
  456.     h264_chroma_mc_func chroma_op = chroma_put;
  457. 

libavcodec/cavs.c:466:9: Call
  464.     if (mv->ref >= 0) {
  465.         AVFrame *ref = h->DPB[mv->ref].f;
  466.         mc_dir_part(h, ref, chroma_height, delta, 0,
               ^
  467.                     dest_y, dest_cb, dest_cr, x_offset, y_offset,
  468.                     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, int chroma_height,
     ^
380.                                int delta, int list, uint8_t *dest_y,
381.                                uint8_t *dest_cb, uint8_t *dest_cr,

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

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

libavcodec/cavs.c:388:5: Assignment
    386.     const int mx         = mv->x + src_x_offset*8;
    387.     const int my         = mv->y + src_y_offset*8;
    388.     const int luma_xy    = (mx & 3) + ((my & 3) << 2);
             ^
    389.     uint8_t *src_y       = pic->data[0] + (mx >> 2) + (my >> 2) * h->l_stride;
    390.     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, int chroma_height,
     ^
380.                                int delta, int list, uint8_t *dest_y,
381.                                uint8_t *dest_cb, uint8_t *dest_cr,

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

libavcodec/cavs.c:421:5: Array access: Offset: [1, 16] (⇐ 1 + [0, 15]) Size: 2 by call to `mc_part_std` 
    419. 
    420.     // FIXME try variable height perhaps?
    421.     qpix_op[luma_xy](dest_y, src_y, h->l_stride);
             ^
    422. 
    423.     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;
    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;
    int emu = 0;
    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{\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,\n                               uint8_t *dest_cb,\n                               uint8_t *dest_cr,\n                               int x_offset, int y_offset,\n                               qpel_mc_func *qpix_put,\n                               h264_chroma_mc_func chroma_put,\n                               qpel_mc_func *qpix_avg,\n                               h264_chroma_mc_func chroma_avg,\n                               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, int chroma_height,\n                               int delta, int list, uint8_t *dest_y,\n                               uint8_t *dest_cb, uint8_t *dest_cr,\n                               int src_x_offset, int src_y_offset,\n                               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    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    int emu = 0;\n    if (!pic->data[0])\n        return;\n    if (mx & 7)\n        extra_width  -= 3;\n    if (my & 7)\n        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,\n                                 src_y - 2 - 2 * h->l_stride, h->l_stride,\n                                 16 + 5, 16 + 5  ,\n                                 full_mx - 2, full_my - 2,\n                                 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,\n                                 h->c_stride,\n                                 9, 9  ,\n                                 mx >> 3, my >> 3,\n                                 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,\n                                 h->c_stride,\n                                 9, 9  ,\n                                 mx >> 3, my >> 3,\n                                 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}']