libavcodec/motion_est_template.c:727: error: Uninitialized Value
  The value read from ymax was never initialized.

libavcodec/motion_est_template.c:727:5: 
725.     CHECK_CLIPPED_MV(x, y+1);
726.     CHECK_CLIPPED_MV(x-1, y);
727.     CHECK_CLIPPED_MV(x, y-1);
         ^
728. 
729.     return dmin;

static int l2s_dia_search(MpegEncContext * s, int *best, int dmin,
                                       int src_index, int ref_index, int const penalty_factor,
                                       int size, int h, int flags)
{
    MotionEstContext * const c= &s->me;
    me_cmp_func cmpf, chroma_cmpf;
    LOAD_COMMON
    LOAD_COMMON2
    int map_generation= c->map_generation;
    int x,y,i,d;
    int dia_size= c->dia_size&0xFF;
    const int dec= dia_size & (dia_size-1);
    static const int hex[8][2]={{-2, 0}, {-1,-1}, { 0,-2}, { 1,-1},
                                { 2, 0}, { 1, 1}, { 0, 2}, {-1, 1}};
    cmpf= s->dsp.me_cmp[size];
    chroma_cmpf= s->dsp.me_cmp[size+1];
    for(; dia_size; dia_size= dec ? dia_size-1 : dia_size>>1){
        do{
            x= best[0];
            y= best[1];
            for(i=0; i<8; i++){
                CHECK_CLIPPED_MV(x+hex[i][0]*dia_size, y+hex[i][1]*dia_size);
            }
        }while(best[0] != x || best[1] != y);
    }
    x= best[0];
    y= best[1];
    CHECK_CLIPPED_MV(x+1, y);
    CHECK_CLIPPED_MV(x, y+1);
    CHECK_CLIPPED_MV(x-1, y);
    CHECK_CLIPPED_MV(x, y-1);
    return dmin;
}
['static int l2s_dia_search(MpegEncContext * s, int *best, int dmin,\n                                       int src_index, int ref_index, int const penalty_factor,\n                                       int size, int h, int flags)\n{\n    MotionEstContext * const c= &s->me;\n    me_cmp_func cmpf, chroma_cmpf;\n    LOAD_COMMON\n    LOAD_COMMON2\n    int map_generation= c->map_generation;\n    int x,y,i,d;\n    int dia_size= c->dia_size&0xFF;\n    const int dec= dia_size & (dia_size-1);\n    static const int hex[8][2]={{-2, 0}, {-1,-1}, { 0,-2}, { 1,-1},\n                                { 2, 0}, { 1, 1}, { 0, 2}, {-1, 1}};\n    cmpf= s->dsp.me_cmp[size];\n    chroma_cmpf= s->dsp.me_cmp[size+1];\n    for(; dia_size; dia_size= dec ? dia_size-1 : dia_size>>1){\n        do{\n            x= best[0];\n            y= best[1];\n            for(i=0; i<8; i++){\n                CHECK_CLIPPED_MV(x+hex[i][0]*dia_size, y+hex[i][1]*dia_size);\n            }\n        }while(best[0] != x || best[1] != y);\n    }\n    x= best[0];\n    y= best[1];\n    CHECK_CLIPPED_MV(x+1, y);\n    CHECK_CLIPPED_MV(x, y+1);\n    CHECK_CLIPPED_MV(x-1, y);\n    CHECK_CLIPPED_MV(x, y-1);\n    return dmin;\n}']