Logo Search packages:      
Sourcecode: blender version File versions  Download package

static void get_limits ( MpegEncContext s,
int  x,
int  y 
) [inline, static]

get fullpel ME search limits.

Definition at line 687 of file motion_est.c.

References MpegEncContext::mb_height, MpegEncContext::mb_width, MpegEncContext::me, MpegEncContext::out_format, MpegEncContext::unrestricted_mv, MotionEstContext::xmax, MotionEstContext::xmin, MotionEstContext::ymax, and MotionEstContext::ymin.

{
    MotionEstContext * const c= &s->me;
/*
    if(c->avctx->me_range) c->range= c->avctx->me_range >> 1;
    else                   c->range= 16;
*/
    if (s->unrestricted_mv) {
        c->xmin = - x - 16;
        c->ymin = - y - 16;
        c->xmax = - x + s->mb_width *16;
        c->ymax = - y + s->mb_height*16;
    } else if (s->out_format == FMT_H261){
        // Search range of H261 is different from other codec standards
        c->xmin = (x > 15) ? - 15 : 0;
        c->ymin = (y > 15) ? - 15 : 0;
        c->xmax = (x < s->mb_width * 16 - 16) ? 15 : 0;
        c->ymax = (y < s->mb_height * 16 - 16) ? 15 : 0;
    } else {
        c->xmin = - x;
        c->ymin = - y;
        c->xmax = - x + s->mb_width *16 - 16;
        c->ymax = - y + s->mb_height*16 - 16;
    }
}


Generated by  Doxygen 1.6.0   Back to index