static inline void set_p_mv_tables(MpegEncContext * s, int mx, int my)

{

    const int xy= s->mb_x + 1 + (s->mb_y + 1)*(s->mb_width + 2);

    

    s->p_mv_table[xy][0] = mx;

    s->p_mv_table[xy][1] = my;



    /* has allready been set to the 4 MV if 4MV is done */

    if(!(s->flags&CODEC_FLAG_4MV)){

        int mot_xy= s->block_index[0];



        s->motion_val[mot_xy  ][0]= mx;

        s->motion_val[mot_xy  ][1]= my;

        s->motion_val[mot_xy+1][0]= mx;

        s->motion_val[mot_xy+1][1]= my;



        mot_xy += s->block_wrap[0];

        s->motion_val[mot_xy  ][0]= mx;

        s->motion_val[mot_xy  ][1]= my;

        s->motion_val[mot_xy+1][0]= mx;

        s->motion_val[mot_xy+1][1]= my;

    }

}

static inline void set_p_mv_tables(MpegEncContext * s, int mx, int my)

{

    const int xy= s->mb_x + 1 + (s->mb_y + 1)*(s->mb_width + 2);

    

    s->p_mv_table[xy][0] = mx;

    s->p_mv_table[xy][1] = my;



    

    if(!(s->flags&CODEC_FLAG_4MV)){

        int mot_xy= s->block_index[0];



        s->motion_val[mot_xy  ][0]= mx;

        s->motion_val[mot_xy  ][1]= my;

        s->motion_val[mot_xy+1][0]= mx;

        s->motion_val[mot_xy+1][1]= my;



        mot_xy += s->block_wrap[0];

        s->motion_val[mot_xy  ][0]= mx;

        s->motion_val[mot_xy  ][1]= my;

        s->motion_val[mot_xy+1][0]= mx;

        s->motion_val[mot_xy+1][1]= my;

    }

}

static inline void FUNC_0(MpegEncContext * VAR_0, int VAR_1, int VAR_2)

{

    const int VAR_3= VAR_0->mb_x + 1 + (VAR_0->mb_y + 1)*(VAR_0->mb_width + 2);

    

    VAR_0->p_mv_table[VAR_3][0] = VAR_1;

    VAR_0->p_mv_table[VAR_3][1] = VAR_2;



    

    if(!(VAR_0->flags&CODEC_FLAG_4MV)){

        int VAR_4= VAR_0->block_index[0];



        VAR_0->motion_val[VAR_4  ][0]= VAR_1;

        VAR_0->motion_val[VAR_4  ][1]= VAR_2;

        VAR_0->motion_val[VAR_4+1][0]= VAR_1;

        VAR_0->motion_val[VAR_4+1][1]= VAR_2;



        VAR_4 += VAR_0->block_wrap[0];

        VAR_0->motion_val[VAR_4  ][0]= VAR_1;

        VAR_0->motion_val[VAR_4  ][1]= VAR_2;

        VAR_0->motion_val[VAR_4+1][0]= VAR_1;

        VAR_0->motion_val[VAR_4+1][1]= VAR_2;

    }

}

static inline void FUNC_0(MpegEncContext * VAR_0, int VAR_1, int VAR_2)
{ const int VAR_3= VAR_0->mb_x + 1 + (VAR_0->mb_y + 1)*(VAR_0->mb_width + 2); VAR_0->p_mv_table[VAR_3][0] = VAR_1; VAR_0->p_mv_table[VAR_3][1] = VAR_2; if(!(VAR_0->flags&CODEC_FLAG_4MV)){ int VAR_4= VAR_0->block_index[0]; VAR_0->motion_val[VAR_4  ][0]= VAR_1; VAR_0->motion_val[VAR_4  ][1]= VAR_2; VAR_0->motion_val[VAR_4+1][0]= VAR_1; VAR_0->motion_val[VAR_4+1][1]= VAR_2; VAR_4 += VAR_0->block_wrap[0]; VAR_0->motion_val[VAR_4  ][0]= VAR_1; VAR_0->motion_val[VAR_4  ][1]= VAR_2; VAR_0->motion_val[VAR_4+1][0]= VAR_1; VAR_0->motion_val[VAR_4+1][1]= VAR_2; } }