static inline void get_limits(MpegEncContext *s, int *range, int *xmin, int *ymin, int *xmax, int *ymax, int f_code)

{

    *range = 8 * (1 << (f_code - 1));

    /* XXX: temporary kludge to avoid overflow for msmpeg4 */

    if (s->out_format == FMT_H263 && !s->h263_msmpeg4)

	*range *= 2;



    if (s->unrestricted_mv) {

        *xmin = -16;

        *ymin = -16;

        if (s->h263_plus)

            *range *= 2;

        if(s->avctx->codec->id!=CODEC_ID_MPEG4){

            *xmax = s->mb_width*16;

            *ymax = s->mb_height*16;

        }else {

            *xmax = s->width;

            *ymax = s->height;

        }

    } else {

        *xmin = 0;

        *ymin = 0;

        *xmax = s->mb_width*16 - 16;

        *ymax = s->mb_height*16 - 16;

    }

}

static inline void get_limits(MpegEncContext *s, int *range, int *xmin, int *ymin, int *xmax, int *ymax, int f_code)

{

    *range = 8 * (1 << (f_code - 1));

    

    if (s->out_format == FMT_H263 && !s->h263_msmpeg4)

	*range *= 2;



    if (s->unrestricted_mv) {

        *xmin = -16;

        *ymin = -16;

        if (s->h263_plus)

            *range *= 2;

        if(s->avctx->codec->id!=CODEC_ID_MPEG4){

            *xmax = s->mb_width*16;

            *ymax = s->mb_height*16;

        }else {

            *xmax = s->width;

            *ymax = s->height;

        }

    } else {

        *xmin = 0;

        *ymin = 0;

        *xmax = s->mb_width*16 - 16;

        *ymax = s->mb_height*16 - 16;

    }

}

static inline void FUNC_0(MpegEncContext *VAR_0, int *VAR_1, int *VAR_2, int *VAR_3, int *VAR_4, int *VAR_5, int VAR_6)

{

    *VAR_1 = 8 * (1 << (VAR_6 - 1));

    

    if (VAR_0->out_format == FMT_H263 && !VAR_0->h263_msmpeg4)

	*VAR_1 *= 2;



    if (VAR_0->unrestricted_mv) {

        *VAR_2 = -16;

        *VAR_3 = -16;

        if (VAR_0->h263_plus)

            *VAR_1 *= 2;

        if(VAR_0->avctx->codec->id!=CODEC_ID_MPEG4){

            *VAR_4 = VAR_0->mb_width*16;

            *VAR_5 = VAR_0->mb_height*16;

        }else {

            *VAR_4 = VAR_0->width;

            *VAR_5 = VAR_0->height;

        }

    } else {

        *VAR_2 = 0;

        *VAR_3 = 0;

        *VAR_4 = VAR_0->mb_width*16 - 16;

        *VAR_5 = VAR_0->mb_height*16 - 16;

    }

}

static inline void FUNC_0(MpegEncContext *VAR_0, int *VAR_1, int *VAR_2, int *VAR_3, int *VAR_4, int *VAR_5, int VAR_6)
{ *VAR_1 = 8 * (1 << (VAR_6 - 1)); if (VAR_0->out_format == FMT_H263 && !VAR_0->h263_msmpeg4)
*VAR_1 *= 2; if (VAR_0->unrestricted_mv) { *VAR_2 = -16; *VAR_3 = -16; if (VAR_0->h263_plus)
*VAR_1 *= 2; if(VAR_0->avctx->codec->id!=CODEC_ID_MPEG4){ *VAR_4 = VAR_0->mb_width*16; *VAR_5 = VAR_0->mb_height*16; }else { *VAR_4 = VAR_0->width; *VAR_5 = VAR_0->height; } } else { *VAR_2 = 0; *VAR_3 = 0; *VAR_4 = VAR_0->mb_width*16 - 16; *VAR_5 = VAR_0->mb_height*16 - 16; } }