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

libavcodec/motion_est_template.c:447:22: 
445.         next_dir=-1;
446. 
447.         if(dir!=2 && x>xmin) CHECK_MV_DIR(x-1, y  , 0)
                          ^
448.         if(dir!=3 && y>ymin) CHECK_MV_DIR(x  , y-1, 1)
449.         if(dir!=0 && x<xmax) CHECK_MV_DIR(x+1, y  , 2)

static av_always_inline int small_diamond_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;
    int next_dir=-1;
    LOAD_COMMON
    LOAD_COMMON2
    unsigned map_generation = c->map_generation;
    cmpf= s->dsp.me_cmp[size];
    chroma_cmpf= s->dsp.me_cmp[size+1];
    {
        const unsigned key = (best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;
        const int index= ((best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);
        if(map[index]!=key){
            score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);
            map[index]= key;
        }
    }
    for(;;){
        int d;
        const int dir= next_dir;
        const int x= best[0];
        const int y= best[1];
        next_dir=-1;
        if(dir!=2 && x>xmin) CHECK_MV_DIR(x-1, y  , 0)
        if(dir!=3 && y>ymin) CHECK_MV_DIR(x  , y-1, 1)
        if(dir!=0 && x<xmax) CHECK_MV_DIR(x+1, y  , 2)
        if(dir!=1 && y<ymax) CHECK_MV_DIR(x  , y+1, 3)
        if(next_dir==-1){
            return dmin;
        }
    }
}
['static av_always_inline int small_diamond_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    int next_dir=-1;\n    LOAD_COMMON\n    LOAD_COMMON2\n    unsigned map_generation = c->map_generation;\n    cmpf= s->dsp.me_cmp[size];\n    chroma_cmpf= s->dsp.me_cmp[size+1];\n    {\n        const unsigned key = (best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;\n        const int index= ((best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);\n        if(map[index]!=key){\n            score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\n            map[index]= key;\n        }\n    }\n    for(;;){\n        int d;\n        const int dir= next_dir;\n        const int x= best[0];\n        const int y= best[1];\n        next_dir=-1;\n        if(dir!=2 && x>xmin) CHECK_MV_DIR(x-1, y  , 0)\n        if(dir!=3 && y>ymin) CHECK_MV_DIR(x  , y-1, 1)\n        if(dir!=0 && x<xmax) CHECK_MV_DIR(x+1, y  , 2)\n        if(dir!=1 && y<ymax) CHECK_MV_DIR(x  , y+1, 3)\n        if(next_dir==-1){\n            return dmin;\n        }\n    }\n}']