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

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

libavcodec/cavs.c:497:9: Call
495.                     h->h264chroma.avg_h264_chroma_pixels_tab[1],
496.                     &h->mv[MV_FWD_X0]);
497.         mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 4, 0,
             ^
498.                     h->cdsp.put_cavs_qpel_pixels_tab[1],
499.                     h->h264chroma.put_h264_chroma_pixels_tab[1],

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

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

libavcodec/cavs.c:465:9: Call
  463.     if (mv->ref >= 0) {
  464.         AVFrame *ref = h->DPB[mv->ref].f;
  465.         mc_dir_part(h, ref, chroma_height, delta, 0,
               ^
  466.                     dest_y, dest_cb, dest_cr, x_offset, y_offset,
  467.                     qpix_op, chroma_op, mv);

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

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

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:378:1: <Length trace>
376.  ****************************************************************************/
377. 
378. static inline void mc_dir_part(AVSContext *h, AVFrame *pic, int chroma_height,
     ^
379.                                int delta, int list, uint8_t *dest_y,
380.                                uint8_t *dest_cb, uint8_t *dest_cr,

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

libavcodec/cavs.c:420:5: Array access: Offset: [1, 16] (⇐ 1 + [0, 15]) Size: 2 by call to `mc_part_std` 
    418. 
    419.     // FIXME try variable height perhaps?
    420.     qpix_op[luma_xy](dest_y, src_y, h->l_stride);
             ^
    421. 
    422.     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   += x_offset * 2 + y_offset * h->l_stride * 2;\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}']