libavcodec/h264.c:3096: error: Integer Overflow L2
  ([0, 65535] × 16843009):unsigned32 by call to `fill_rectangle`.

libavcodec/h264.c:3096:41: Call
3094. 
3095.     if(!USES_LIST(mb_type, list)){
3096.         fill_rectangle(mv_dst, 4, 4, 8, pack16to32(0,0), 4);
                                              ^
3097.         AV_WN32A(&ref_cache[0*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);
3098.         AV_WN32A(&ref_cache[1*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);

libavcodec/h264.h:750:1: Parameter `a`
  748. };
  749. 
  750. static av_always_inline uint32_t pack16to32(int a, int b){
       ^
  751. #if HAVE_BIGENDIAN
  752.    return (b&0xFFFF) + (a<<16);

libavcodec/h264.h:754:4: Assignment
  752.    return (b&0xFFFF) + (a<<16);
  753. #else
  754.    return (a&0xFFFF) + (b<<16);
          ^
  755. #endif
  756. }

libavcodec/h264.c:3096:9: Call
3094. 
3095.     if(!USES_LIST(mb_type, list)){
3096.         fill_rectangle(mv_dst, 4, 4, 8, pack16to32(0,0), 4);
              ^
3097.         AV_WN32A(&ref_cache[0*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);
3098.         AV_WN32A(&ref_cache[1*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);

libavcodec/rectangle.h:42:1: <LHS trace>
40.  * @param size the size of val (1, 2 or 4), should be a constant
41.  */
42. static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, uint32_t val, int size){
    ^
43.     uint8_t *p= (uint8_t*)vp;
44.     assert(size==1 || size==2 || size==4);

libavcodec/rectangle.h:42:1: Parameter `val`
  40.  * @param size the size of val (1, 2 or 4), should be a constant
  41.  */
  42. static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, uint32_t val, int size){
      ^
  43.     uint8_t *p= (uint8_t*)vp;
  44.     assert(size==1 || size==2 || size==4);

libavcodec/rectangle.h:61:43: Binary operation: ([0, 65535] × 16843009):unsigned32 by call to `fill_rectangle` 
  59.         *(uint16_t*)(p + 3*stride)= v;
  60.     }else if(w==4){
  61.         const uint32_t v= size==4 ? val : size==2 ? val*0x00010001 : val*0x01010101;
                                                ^
  62.         *(uint32_t*)(p + 0*stride)= v;
  63.         if(h==1) return;

static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, uint32_t val, int size){
    uint8_t *p= (uint8_t*)vp;
    assert(size==1 || size==2 || size==4);
    assert(w<=4);
    w      *= size;
    stride *= size;
    assert((((long)vp)&(FFMIN(w, STRIDE_ALIGN)-1)) == 0);
    assert((stride&(w-1))==0);
    if(w==2){
        const uint16_t v= size==4 ? val : val*0x0101;
        *(uint16_t*)(p + 0*stride)= v;
        if(h==1) return;
        *(uint16_t*)(p + 1*stride)= v;
        if(h==2) return;
        *(uint16_t*)(p + 2*stride)= v;
        *(uint16_t*)(p + 3*stride)= v;
    }else if(w==4){
        const uint32_t v= size==4 ? val : size==2 ? val*0x00010001 : val*0x01010101;
        *(uint32_t*)(p + 0*stride)= v;
        if(h==1) return;
        *(uint32_t*)(p + 1*stride)= v;
        if(h==2) return;
        *(uint32_t*)(p + 2*stride)= v;
        *(uint32_t*)(p + 3*stride)= v;
    }else if(w==8){
#if HAVE_FAST_64BIT
        const uint64_t v=  size==2 ? val*0x0001000100010001ULL : val*0x0100000001ULL;
        *(uint64_t*)(p + 0*stride)= v;
        if(h==1) return;
        *(uint64_t*)(p + 1*stride)= v;
        if(h==2) return;
        *(uint64_t*)(p + 2*stride)= v;
        *(uint64_t*)(p + 3*stride)= v;
    }else if(w==16){
        const uint64_t v= val*0x0100000001ULL;
        *(uint64_t*)(p + 0+0*stride)= v;
        *(uint64_t*)(p + 8+0*stride)= v;
        *(uint64_t*)(p + 0+1*stride)= v;
        *(uint64_t*)(p + 8+1*stride)= v;
        if(h==2) return;
        *(uint64_t*)(p + 0+2*stride)= v;
        *(uint64_t*)(p + 8+2*stride)= v;
        *(uint64_t*)(p + 0+3*stride)= v;
        *(uint64_t*)(p + 8+3*stride)= v;
#else
        const uint32_t v= size==2 ? val*0x00010001 : val;
        *(uint32_t*)(p + 0+0*stride)= v;
        *(uint32_t*)(p + 4+0*stride)= v;
        if(h==1) return;
        *(uint32_t*)(p + 0+1*stride)= v;
        *(uint32_t*)(p + 4+1*stride)= v;
        if(h==2) return;
        *(uint32_t*)(p + 0+2*stride)= v;
        *(uint32_t*)(p + 4+2*stride)= v;
        *(uint32_t*)(p + 0+3*stride)= v;
        *(uint32_t*)(p + 4+3*stride)= v;
    }else if(w==16){
        *(uint32_t*)(p + 0+0*stride)= val;
        *(uint32_t*)(p + 4+0*stride)= val;
        *(uint32_t*)(p + 8+0*stride)= val;
        *(uint32_t*)(p +12+0*stride)= val;
        *(uint32_t*)(p + 0+1*stride)= val;
        *(uint32_t*)(p + 4+1*stride)= val;
        *(uint32_t*)(p + 8+1*stride)= val;
        *(uint32_t*)(p +12+1*stride)= val;
        if(h==2) return;
        *(uint32_t*)(p + 0+2*stride)= val;
        *(uint32_t*)(p + 4+2*stride)= val;
        *(uint32_t*)(p + 8+2*stride)= val;
        *(uint32_t*)(p +12+2*stride)= val;
        *(uint32_t*)(p + 0+3*stride)= val;
        *(uint32_t*)(p + 4+3*stride)= val;
        *(uint32_t*)(p + 8+3*stride)= val;
        *(uint32_t*)(p +12+3*stride)= val;
#endif
    }else
        assert(0);
    assert(h==4);
}
['static av_always_inline void fill_filter_caches_inter(H264Context *h, MpegEncContext * const s, int mb_type, int top_xy,\n                                                      int left_xy[LEFT_MBS], int top_type, int left_type[LEFT_MBS], int mb_xy, int list)\n{\n    int b_stride = h->b_stride;\n    int16_t (*mv_dst)[2] = &h->mv_cache[list][scan8[0]];\n    int8_t *ref_cache = &h->ref_cache[list][scan8[0]];\n    if(IS_INTER(mb_type) || IS_DIRECT(mb_type)){\n        if(USES_LIST(top_type, list)){\n            const int b_xy= h->mb2b_xy[top_xy] + 3*b_stride;\n            const int b8_xy= 4*top_xy + 2;\n            int (*ref2frm)[64] = h->ref2frm[ h->slice_table[top_xy]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);\n            AV_COPY128(mv_dst - 1*8, s->current_picture.motion_val[list][b_xy + 0]);\n            ref_cache[0 - 1*8]=\n            ref_cache[1 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 0]];\n            ref_cache[2 - 1*8]=\n            ref_cache[3 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 1]];\n        }else{\n            AV_ZERO128(mv_dst - 1*8);\n            AV_WN32A(&ref_cache[0 - 1*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);\n        }\n        if(!IS_INTERLACED(mb_type^left_type[LTOP])){\n            if(USES_LIST(left_type[LTOP], list)){\n                const int b_xy= h->mb2b_xy[left_xy[LTOP]] + 3;\n                const int b8_xy= 4*left_xy[LTOP] + 1;\n                int (*ref2frm)[64] = h->ref2frm[ h->slice_table[left_xy[LTOP]]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);\n                AV_COPY32(mv_dst - 1 + 0, s->current_picture.motion_val[list][b_xy + b_stride*0]);\n                AV_COPY32(mv_dst - 1 + 8, s->current_picture.motion_val[list][b_xy + b_stride*1]);\n                AV_COPY32(mv_dst - 1 +16, s->current_picture.motion_val[list][b_xy + b_stride*2]);\n                AV_COPY32(mv_dst - 1 +24, s->current_picture.motion_val[list][b_xy + b_stride*3]);\n                ref_cache[-1 +  0]=\n                ref_cache[-1 +  8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 2*0]];\n                ref_cache[-1 + 16]=\n                ref_cache[-1 + 24]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 2*1]];\n            }else{\n                AV_ZERO32(mv_dst - 1 + 0);\n                AV_ZERO32(mv_dst - 1 + 8);\n                AV_ZERO32(mv_dst - 1 +16);\n                AV_ZERO32(mv_dst - 1 +24);\n                ref_cache[-1 +  0]=\n                ref_cache[-1 +  8]=\n                ref_cache[-1 + 16]=\n                ref_cache[-1 + 24]= LIST_NOT_USED;\n            }\n        }\n    }\n    if(!USES_LIST(mb_type, list)){\n        fill_rectangle(mv_dst, 4, 4, 8, pack16to32(0,0), 4);\n        AV_WN32A(&ref_cache[0*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);\n        AV_WN32A(&ref_cache[1*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);\n        AV_WN32A(&ref_cache[2*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);\n        AV_WN32A(&ref_cache[3*8], ((LIST_NOT_USED)&0xFF)*0x01010101u);\n        return;\n    }\n    {\n        int8_t *ref = &s->current_picture.ref_index[list][4*mb_xy];\n        int (*ref2frm)[64] = h->ref2frm[ h->slice_num&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);\n        uint32_t ref01 = (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101;\n        uint32_t ref23 = (pack16to32(ref2frm[list][ref[2]],ref2frm[list][ref[3]])&0x00FF00FF)*0x0101;\n        AV_WN32A(&ref_cache[0*8], ref01);\n        AV_WN32A(&ref_cache[1*8], ref01);\n        AV_WN32A(&ref_cache[2*8], ref23);\n        AV_WN32A(&ref_cache[3*8], ref23);\n    }\n    {\n        int16_t (*mv_src)[2] = &s->current_picture.motion_val[list][4*s->mb_x + 4*s->mb_y*b_stride];\n        AV_COPY128(mv_dst + 8*0, mv_src + 0*b_stride);\n        AV_COPY128(mv_dst + 8*1, mv_src + 1*b_stride);\n        AV_COPY128(mv_dst + 8*2, mv_src + 2*b_stride);\n        AV_COPY128(mv_dst + 8*3, mv_src + 3*b_stride);\n    }\n}', 'static av_always_inline uint32_t pack16to32(int a, int b){\n#if HAVE_BIGENDIAN\n   return (b&0xFFFF) + (a<<16);\n#else\n   return (a&0xFFFF) + (b<<16);\n#endif\n}', 'static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, uint32_t val, int size){\n    uint8_t *p= (uint8_t*)vp;\n    assert(size==1 || size==2 || size==4);\n    assert(w<=4);\n    w      *= size;\n    stride *= size;\n    assert((((long)vp)&(FFMIN(w, STRIDE_ALIGN)-1)) == 0);\n    assert((stride&(w-1))==0);\n    if(w==2){\n        const uint16_t v= size==4 ? val : val*0x0101;\n        *(uint16_t*)(p + 0*stride)= v;\n        if(h==1) return;\n        *(uint16_t*)(p + 1*stride)= v;\n        if(h==2) return;\n        *(uint16_t*)(p + 2*stride)= v;\n        *(uint16_t*)(p + 3*stride)= v;\n    }else if(w==4){\n        const uint32_t v= size==4 ? val : size==2 ? val*0x00010001 : val*0x01010101;\n        *(uint32_t*)(p + 0*stride)= v;\n        if(h==1) return;\n        *(uint32_t*)(p + 1*stride)= v;\n        if(h==2) return;\n        *(uint32_t*)(p + 2*stride)= v;\n        *(uint32_t*)(p + 3*stride)= v;\n    }else if(w==8){\n#if HAVE_FAST_64BIT\n        const uint64_t v=  size==2 ? val*0x0001000100010001ULL : val*0x0100000001ULL;\n        *(uint64_t*)(p + 0*stride)= v;\n        if(h==1) return;\n        *(uint64_t*)(p + 1*stride)= v;\n        if(h==2) return;\n        *(uint64_t*)(p + 2*stride)= v;\n        *(uint64_t*)(p + 3*stride)= v;\n    }else if(w==16){\n        const uint64_t v= val*0x0100000001ULL;\n        *(uint64_t*)(p + 0+0*stride)= v;\n        *(uint64_t*)(p + 8+0*stride)= v;\n        *(uint64_t*)(p + 0+1*stride)= v;\n        *(uint64_t*)(p + 8+1*stride)= v;\n        if(h==2) return;\n        *(uint64_t*)(p + 0+2*stride)= v;\n        *(uint64_t*)(p + 8+2*stride)= v;\n        *(uint64_t*)(p + 0+3*stride)= v;\n        *(uint64_t*)(p + 8+3*stride)= v;\n#else\n        const uint32_t v= size==2 ? val*0x00010001 : val;\n        *(uint32_t*)(p + 0+0*stride)= v;\n        *(uint32_t*)(p + 4+0*stride)= v;\n        if(h==1) return;\n        *(uint32_t*)(p + 0+1*stride)= v;\n        *(uint32_t*)(p + 4+1*stride)= v;\n        if(h==2) return;\n        *(uint32_t*)(p + 0+2*stride)= v;\n        *(uint32_t*)(p + 4+2*stride)= v;\n        *(uint32_t*)(p + 0+3*stride)= v;\n        *(uint32_t*)(p + 4+3*stride)= v;\n    }else if(w==16){\n        *(uint32_t*)(p + 0+0*stride)= val;\n        *(uint32_t*)(p + 4+0*stride)= val;\n        *(uint32_t*)(p + 8+0*stride)= val;\n        *(uint32_t*)(p +12+0*stride)= val;\n        *(uint32_t*)(p + 0+1*stride)= val;\n        *(uint32_t*)(p + 4+1*stride)= val;\n        *(uint32_t*)(p + 8+1*stride)= val;\n        *(uint32_t*)(p +12+1*stride)= val;\n        if(h==2) return;\n        *(uint32_t*)(p + 0+2*stride)= val;\n        *(uint32_t*)(p + 4+2*stride)= val;\n        *(uint32_t*)(p + 8+2*stride)= val;\n        *(uint32_t*)(p +12+2*stride)= val;\n        *(uint32_t*)(p + 0+3*stride)= val;\n        *(uint32_t*)(p + 4+3*stride)= val;\n        *(uint32_t*)(p + 8+3*stride)= val;\n        *(uint32_t*)(p +12+3*stride)= val;\n#endif\n    }else\n        assert(0);\n    assert(h==4);\n}']