libavcodec/h264_mvpred.h:391: error: Integer Overflow L2
  ([0, min(1, `*h->cur_pic.mb_type`)] - 1):unsigned32.

libavcodec/h264_mvpred.h:350:1: <LHS trace>
348. }
349. 
350. static void fill_decode_neighbors(H264Context *h, int mb_type)
     ^
351. {
352.     const int mb_xy = h->mb_xy;

libavcodec/h264_mvpred.h:350:1: Parameter `*h->cur_pic.mb_type`
348. }
349. 
350. static void fill_decode_neighbors(H264Context *h, int mb_type)
     ^
351. {
352.     const int mb_xy = h->mb_xy;

libavcodec/h264_mvpred.h:391:17: Binary operation: ([0, min(1, *h->cur_pic.mb_type)] - 1):unsigned32
389.         } else {
390.             if (curr_mb_field_flag) {
391.                 topleft_xy  += h->mb_stride & (((h->cur_pic.mb_type[top_xy - 1] >> 7) & 1) - 1);
                     ^
392.                 topright_xy += h->mb_stride & (((h->cur_pic.mb_type[top_xy + 1] >> 7) & 1) - 1);
393.                 top_xy      += h->mb_stride & (((h->cur_pic.mb_type[top_xy]     >> 7) & 1) - 1);

static void fill_decode_neighbors(H264Context *h, int mb_type)
{
    const int mb_xy = h->mb_xy;
    int topleft_xy, top_xy, topright_xy, left_xy[LEFT_MBS];
    static const uint8_t left_block_options[4][32] = {
        { 0, 1, 2, 3, 7, 10, 8, 11, 3 + 0 * 4, 3 + 1 * 4, 3 + 2 * 4, 3 + 3 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 5 * 4, 1 + 9 * 4 },
        { 2, 2, 3, 3, 8, 11, 8, 11, 3 + 2 * 4, 3 + 2 * 4, 3 + 3 * 4, 3 + 3 * 4, 1 + 5 * 4, 1 + 9 * 4, 1 + 5 * 4, 1 + 9 * 4 },
        { 0, 0, 1, 1, 7, 10, 7, 10, 3 + 0 * 4, 3 + 0 * 4, 3 + 1 * 4, 3 + 1 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 4 * 4, 1 + 8 * 4 },
        { 0, 2, 0, 2, 7, 10, 7, 10, 3 + 0 * 4, 3 + 2 * 4, 3 + 0 * 4, 3 + 2 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 4 * 4, 1 + 8 * 4 }
    };
    h->topleft_partition = -1;
    top_xy = mb_xy - (h->mb_stride << MB_FIELD);
    topleft_xy    = top_xy - 1;
    topright_xy   = top_xy + 1;
    left_xy[LBOT] = left_xy[LTOP] = mb_xy - 1;
    h->left_block = left_block_options[0];
    if (FRAME_MBAFF) {
        const int left_mb_field_flag = IS_INTERLACED(h->cur_pic.mb_type[mb_xy - 1]);
        const int curr_mb_field_flag = IS_INTERLACED(mb_type);
        if (h->mb_y & 1) {
            if (left_mb_field_flag != curr_mb_field_flag) {
                left_xy[LBOT] = left_xy[LTOP] = mb_xy - h->mb_stride - 1;
                if (curr_mb_field_flag) {
                    left_xy[LBOT] += h->mb_stride;
                    h->left_block  = left_block_options[3];
                } else {
                    topleft_xy += h->mb_stride;
                    h->topleft_partition = 0;
                    h->left_block        = left_block_options[1];
                }
            }
        } else {
            if (curr_mb_field_flag) {
                topleft_xy  += h->mb_stride & (((h->cur_pic.mb_type[top_xy - 1] >> 7) & 1) - 1);
                topright_xy += h->mb_stride & (((h->cur_pic.mb_type[top_xy + 1] >> 7) & 1) - 1);
                top_xy      += h->mb_stride & (((h->cur_pic.mb_type[top_xy]     >> 7) & 1) - 1);
            }
            if (left_mb_field_flag != curr_mb_field_flag) {
                if (curr_mb_field_flag) {
                    left_xy[LBOT] += h->mb_stride;
                    h->left_block  = left_block_options[3];
                } else {
                    h->left_block = left_block_options[2];
                }
            }
        }
    }
    h->topleft_mb_xy    = topleft_xy;
    h->top_mb_xy        = top_xy;
    h->topright_mb_xy   = topright_xy;
    h->left_mb_xy[LTOP] = left_xy[LTOP];
    h->left_mb_xy[LBOT] = left_xy[LBOT];
    h->topleft_type    = h->cur_pic.mb_type[topleft_xy];
    h->top_type        = h->cur_pic.mb_type[top_xy];
    h->topright_type   = h->cur_pic.mb_type[topright_xy];
    h->left_type[LTOP] = h->cur_pic.mb_type[left_xy[LTOP]];
    h->left_type[LBOT] = h->cur_pic.mb_type[left_xy[LBOT]];
    if (FMO) {
        if (h->slice_table[topleft_xy] != h->slice_num)
            h->topleft_type = 0;
        if (h->slice_table[top_xy] != h->slice_num)
            h->top_type = 0;
        if (h->slice_table[left_xy[LTOP]] != h->slice_num)
            h->left_type[LTOP] = h->left_type[LBOT] = 0;
    } else {
        if (h->slice_table[topleft_xy] != h->slice_num) {
            h->topleft_type = 0;
            if (h->slice_table[top_xy] != h->slice_num)
                h->top_type = 0;
            if (h->slice_table[left_xy[LTOP]] != h->slice_num)
                h->left_type[LTOP] = h->left_type[LBOT] = 0;
        }
    }
    if (h->slice_table[topright_xy] != h->slice_num)
        h->topright_type = 0;
}
['static void fill_decode_neighbors(H264Context *h, int mb_type)\n{\n    const int mb_xy = h->mb_xy;\n    int topleft_xy, top_xy, topright_xy, left_xy[LEFT_MBS];\n    static const uint8_t left_block_options[4][32] = {\n        { 0, 1, 2, 3, 7, 10, 8, 11, 3 + 0 * 4, 3 + 1 * 4, 3 + 2 * 4, 3 + 3 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 5 * 4, 1 + 9 * 4 },\n        { 2, 2, 3, 3, 8, 11, 8, 11, 3 + 2 * 4, 3 + 2 * 4, 3 + 3 * 4, 3 + 3 * 4, 1 + 5 * 4, 1 + 9 * 4, 1 + 5 * 4, 1 + 9 * 4 },\n        { 0, 0, 1, 1, 7, 10, 7, 10, 3 + 0 * 4, 3 + 0 * 4, 3 + 1 * 4, 3 + 1 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 4 * 4, 1 + 8 * 4 },\n        { 0, 2, 0, 2, 7, 10, 7, 10, 3 + 0 * 4, 3 + 2 * 4, 3 + 0 * 4, 3 + 2 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 4 * 4, 1 + 8 * 4 }\n    };\n    h->topleft_partition = -1;\n    top_xy = mb_xy - (h->mb_stride << MB_FIELD);\n    topleft_xy    = top_xy - 1;\n    topright_xy   = top_xy + 1;\n    left_xy[LBOT] = left_xy[LTOP] = mb_xy - 1;\n    h->left_block = left_block_options[0];\n    if (FRAME_MBAFF) {\n        const int left_mb_field_flag = IS_INTERLACED(h->cur_pic.mb_type[mb_xy - 1]);\n        const int curr_mb_field_flag = IS_INTERLACED(mb_type);\n        if (h->mb_y & 1) {\n            if (left_mb_field_flag != curr_mb_field_flag) {\n                left_xy[LBOT] = left_xy[LTOP] = mb_xy - h->mb_stride - 1;\n                if (curr_mb_field_flag) {\n                    left_xy[LBOT] += h->mb_stride;\n                    h->left_block  = left_block_options[3];\n                } else {\n                    topleft_xy += h->mb_stride;\n                    h->topleft_partition = 0;\n                    h->left_block        = left_block_options[1];\n                }\n            }\n        } else {\n            if (curr_mb_field_flag) {\n                topleft_xy  += h->mb_stride & (((h->cur_pic.mb_type[top_xy - 1] >> 7) & 1) - 1);\n                topright_xy += h->mb_stride & (((h->cur_pic.mb_type[top_xy + 1] >> 7) & 1) - 1);\n                top_xy      += h->mb_stride & (((h->cur_pic.mb_type[top_xy]     >> 7) & 1) - 1);\n            }\n            if (left_mb_field_flag != curr_mb_field_flag) {\n                if (curr_mb_field_flag) {\n                    left_xy[LBOT] += h->mb_stride;\n                    h->left_block  = left_block_options[3];\n                } else {\n                    h->left_block = left_block_options[2];\n                }\n            }\n        }\n    }\n    h->topleft_mb_xy    = topleft_xy;\n    h->top_mb_xy        = top_xy;\n    h->topright_mb_xy   = topright_xy;\n    h->left_mb_xy[LTOP] = left_xy[LTOP];\n    h->left_mb_xy[LBOT] = left_xy[LBOT];\n    h->topleft_type    = h->cur_pic.mb_type[topleft_xy];\n    h->top_type        = h->cur_pic.mb_type[top_xy];\n    h->topright_type   = h->cur_pic.mb_type[topright_xy];\n    h->left_type[LTOP] = h->cur_pic.mb_type[left_xy[LTOP]];\n    h->left_type[LBOT] = h->cur_pic.mb_type[left_xy[LBOT]];\n    if (FMO) {\n        if (h->slice_table[topleft_xy] != h->slice_num)\n            h->topleft_type = 0;\n        if (h->slice_table[top_xy] != h->slice_num)\n            h->top_type = 0;\n        if (h->slice_table[left_xy[LTOP]] != h->slice_num)\n            h->left_type[LTOP] = h->left_type[LBOT] = 0;\n    } else {\n        if (h->slice_table[topleft_xy] != h->slice_num) {\n            h->topleft_type = 0;\n            if (h->slice_table[top_xy] != h->slice_num)\n                h->top_type = 0;\n            if (h->slice_table[left_xy[LTOP]] != h->slice_num)\n                h->left_type[LTOP] = h->left_type[LBOT] = 0;\n        }\n    }\n    if (h->slice_table[topright_xy] != h->slice_num)\n        h->topright_type = 0;\n}']