static inline int direct_search(MpegEncContext * s,

                                int mb_x, int mb_y)

{

    int P[6][2];

    const int mot_stride = s->mb_width + 2;

    const int mot_xy = (mb_y + 1)*mot_stride + mb_x + 1;

    int dmin, dmin2;

    int motion_fx, motion_fy, motion_bx, motion_by, motion_bx0, motion_by0;

    int motion_dx, motion_dy;

    const int motion_px= s->p_mv_table[mot_xy][0];

    const int motion_py= s->p_mv_table[mot_xy][1];

    const int time_pp= s->pp_time;

    const int time_bp= s->bp_time;

    const int time_pb= time_pp - time_bp;

    int bx, by;

    int mx, my, mx2, my2;

    uint8_t *ref_picture= s->me_scratchpad - (mb_x + 1 + (mb_y + 1)*s->linesize)*16;

    int16_t (*mv_table)[2]= s->b_direct_mv_table;

    uint16_t *mv_penalty= s->mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame



    /* thanks to iso-mpeg the rounding is different for the zero vector, so we need to handle that ... */

    motion_fx= (motion_px*time_pb)/time_pp;

    motion_fy= (motion_py*time_pb)/time_pp;

    motion_bx0= (-motion_px*time_bp)/time_pp;

    motion_by0= (-motion_py*time_bp)/time_pp;

    motion_dx= motion_dy=0;

    dmin2= check_bidir_mv(s, mb_x, mb_y, 

                          motion_fx, motion_fy,

                          motion_bx0, motion_by0,

                          motion_fx, motion_fy,

                          motion_bx0, motion_by0) - s->qscale;



    motion_bx= motion_fx - motion_px;

    motion_by= motion_fy - motion_py;

    for(by=-1; by<2; by++){

        for(bx=-1; bx<2; bx++){

            uint8_t *dest_y = s->me_scratchpad + (by+1)*s->linesize*16 + (bx+1)*16;

            uint8_t *ptr;

            int dxy;

            int src_x, src_y;

            const int width= s->width;

            const int height= s->height;



            dxy = ((motion_fy & 1) << 1) | (motion_fx & 1);

            src_x = (mb_x + bx) * 16 + (motion_fx >> 1);

            src_y = (mb_y + by) * 16 + (motion_fy >> 1);

            src_x = clip(src_x, -16, width);

            if (src_x == width) dxy &= ~1;

            src_y = clip(src_y, -16, height);

            if (src_y == height) dxy &= ~2;



            ptr = s->last_picture[0] + (src_y * s->linesize) + src_x;

            put_pixels_tab[dxy](dest_y    , ptr    , s->linesize, 16);

            put_pixels_tab[dxy](dest_y + 8, ptr + 8, s->linesize, 16);



            dxy = ((motion_by & 1) << 1) | (motion_bx & 1);

            src_x = (mb_x + bx) * 16 + (motion_bx >> 1);

            src_y = (mb_y + by) * 16 + (motion_by >> 1);

            src_x = clip(src_x, -16, width);

            if (src_x == width) dxy &= ~1;

            src_y = clip(src_y, -16, height);

            if (src_y == height) dxy &= ~2;



            avg_pixels_tab[dxy](dest_y    , ptr    , s->linesize, 16);

            avg_pixels_tab[dxy](dest_y + 8, ptr + 8, s->linesize, 16);

        }

    }



    P[0][0] = mv_table[mot_xy    ][0];

    P[0][1] = mv_table[mot_xy    ][1];

    P[1][0] = mv_table[mot_xy - 1][0];

    P[1][1] = mv_table[mot_xy - 1][1];



    /* special case for first line */

    if ((mb_y == 0 || s->first_slice_line || s->first_gob_line)) {

        P[4][0] = P[1][0];

        P[4][1] = P[1][1];

    } else {

        P[2][0] = mv_table[mot_xy - mot_stride             ][0];

        P[2][1] = mv_table[mot_xy - mot_stride             ][1];

        P[3][0] = mv_table[mot_xy - mot_stride + 1         ][0];

        P[3][1] = mv_table[mot_xy - mot_stride + 1         ][1];

    

        P[4][0]= mid_pred(P[1][0], P[2][0], P[3][0]);

        P[4][1]= mid_pred(P[1][1], P[2][1], P[3][1]);

    }

    dmin = epzs_motion_search(s, &mx, &my, P, 0, 0, -16, -16, 15, 15, ref_picture);

    if(mx==0 && my==0) dmin=99999999; // not representable, due to rounding stuff

    if(dmin2<dmin){ 

        dmin= dmin2;

        mx=0;

        my=0;

    }

#if 1

    mx2= mx= mx*2; 

    my2= my= my*2;

    for(by=-1; by<2; by++){

        if(my2+by < -32) continue;

        for(bx=-1; bx<2; bx++){

            if(bx==0 && by==0) continue;

            if(mx2+bx < -32) continue;

            dmin2= check_bidir_mv(s, mb_x, mb_y, 

                          mx2+bx+motion_fx, my2+by+motion_fy,

                          mx2+bx+motion_bx, my2+by+motion_by,

                          mx2+bx+motion_fx, my2+by+motion_fy,

                          motion_bx, motion_by) - s->qscale;

            

            if(dmin2<dmin){

                dmin=dmin2;

                mx= mx2 + bx;

                my= my2 + by;

            }

        }

    }

#else

    mx*=2; my*=2;

#endif

    if(mx==0 && my==0){

        motion_bx= motion_bx0;

        motion_by= motion_by0;

    }



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

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

    s->b_direct_forw_mv_table[mot_xy][0]= motion_fx + mx;

    s->b_direct_forw_mv_table[mot_xy][1]= motion_fy + my;

    s->b_direct_back_mv_table[mot_xy][0]= motion_bx + mx;

    s->b_direct_back_mv_table[mot_xy][1]= motion_by + my;

    return dmin;

}

static inline int direct_search(MpegEncContext * s,

                                int mb_x, int mb_y)

{

    int P[6][2];

    const int mot_stride = s->mb_width + 2;

    const int mot_xy = (mb_y + 1)*mot_stride + mb_x + 1;

    int dmin, dmin2;

    int motion_fx, motion_fy, motion_bx, motion_by, motion_bx0, motion_by0;

    int motion_dx, motion_dy;

    const int motion_px= s->p_mv_table[mot_xy][0];

    const int motion_py= s->p_mv_table[mot_xy][1];

    const int time_pp= s->pp_time;

    const int time_bp= s->bp_time;

    const int time_pb= time_pp - time_bp;

    int bx, by;

    int mx, my, mx2, my2;

    uint8_t *ref_picture= s->me_scratchpad - (mb_x + 1 + (mb_y + 1)*s->linesize)*16;

    int16_t (*mv_table)[2]= s->b_direct_mv_table;

    uint16_t *mv_penalty= s->mv_penalty[s->f_code] + MAX_MV; 



    

    motion_fx= (motion_px*time_pb)/time_pp;

    motion_fy= (motion_py*time_pb)/time_pp;

    motion_bx0= (-motion_px*time_bp)/time_pp;

    motion_by0= (-motion_py*time_bp)/time_pp;

    motion_dx= motion_dy=0;

    dmin2= check_bidir_mv(s, mb_x, mb_y, 

                          motion_fx, motion_fy,

                          motion_bx0, motion_by0,

                          motion_fx, motion_fy,

                          motion_bx0, motion_by0) - s->qscale;



    motion_bx= motion_fx - motion_px;

    motion_by= motion_fy - motion_py;

    for(by=-1; by<2; by++){

        for(bx=-1; bx<2; bx++){

            uint8_t *dest_y = s->me_scratchpad + (by+1)*s->linesize*16 + (bx+1)*16;

            uint8_t *ptr;

            int dxy;

            int src_x, src_y;

            const int width= s->width;

            const int height= s->height;



            dxy = ((motion_fy & 1) << 1) | (motion_fx & 1);

            src_x = (mb_x + bx) * 16 + (motion_fx >> 1);

            src_y = (mb_y + by) * 16 + (motion_fy >> 1);

            src_x = clip(src_x, -16, width);

            if (src_x == width) dxy &= ~1;

            src_y = clip(src_y, -16, height);

            if (src_y == height) dxy &= ~2;



            ptr = s->last_picture[0] + (src_y * s->linesize) + src_x;

            put_pixels_tab[dxy](dest_y    , ptr    , s->linesize, 16);

            put_pixels_tab[dxy](dest_y + 8, ptr + 8, s->linesize, 16);



            dxy = ((motion_by & 1) << 1) | (motion_bx & 1);

            src_x = (mb_x + bx) * 16 + (motion_bx >> 1);

            src_y = (mb_y + by) * 16 + (motion_by >> 1);

            src_x = clip(src_x, -16, width);

            if (src_x == width) dxy &= ~1;

            src_y = clip(src_y, -16, height);

            if (src_y == height) dxy &= ~2;



            avg_pixels_tab[dxy](dest_y    , ptr    , s->linesize, 16);

            avg_pixels_tab[dxy](dest_y + 8, ptr + 8, s->linesize, 16);

        }

    }



    P[0][0] = mv_table[mot_xy    ][0];

    P[0][1] = mv_table[mot_xy    ][1];

    P[1][0] = mv_table[mot_xy - 1][0];

    P[1][1] = mv_table[mot_xy - 1][1];



    

    if ((mb_y == 0 || s->first_slice_line || s->first_gob_line)) {

        P[4][0] = P[1][0];

        P[4][1] = P[1][1];

    } else {

        P[2][0] = mv_table[mot_xy - mot_stride             ][0];

        P[2][1] = mv_table[mot_xy - mot_stride             ][1];

        P[3][0] = mv_table[mot_xy - mot_stride + 1         ][0];

        P[3][1] = mv_table[mot_xy - mot_stride + 1         ][1];

    

        P[4][0]= mid_pred(P[1][0], P[2][0], P[3][0]);

        P[4][1]= mid_pred(P[1][1], P[2][1], P[3][1]);

    }

    dmin = epzs_motion_search(s, &mx, &my, P, 0, 0, -16, -16, 15, 15, ref_picture);

    if(mx==0 && my==0) dmin=99999999; 

    if(dmin2<dmin){ 

        dmin= dmin2;

        mx=0;

        my=0;

    }

#if 1

    mx2= mx= mx*2; 

    my2= my= my*2;

    for(by=-1; by<2; by++){

        if(my2+by < -32) continue;

        for(bx=-1; bx<2; bx++){

            if(bx==0 && by==0) continue;

            if(mx2+bx < -32) continue;

            dmin2= check_bidir_mv(s, mb_x, mb_y, 

                          mx2+bx+motion_fx, my2+by+motion_fy,

                          mx2+bx+motion_bx, my2+by+motion_by,

                          mx2+bx+motion_fx, my2+by+motion_fy,

                          motion_bx, motion_by) - s->qscale;

            

            if(dmin2<dmin){

                dmin=dmin2;

                mx= mx2 + bx;

                my= my2 + by;

            }

        }

    }

#else

    mx*=2; my*=2;

#endif

    if(mx==0 && my==0){

        motion_bx= motion_bx0;

        motion_by= motion_by0;

    }



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

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

    s->b_direct_forw_mv_table[mot_xy][0]= motion_fx + mx;

    s->b_direct_forw_mv_table[mot_xy][1]= motion_fy + my;

    s->b_direct_back_mv_table[mot_xy][0]= motion_bx + mx;

    s->b_direct_back_mv_table[mot_xy][1]= motion_by + my;

    return dmin;

}

static inline int FUNC_0(MpegEncContext * VAR_0,

                                int VAR_1, int VAR_2)

{

    int VAR_3[6][2];

    const int VAR_4 = VAR_0->mb_width + 2;

    const int VAR_5 = (VAR_2 + 1)*VAR_4 + VAR_1 + 1;

    int VAR_6, VAR_7;

    int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;

    int VAR_14, VAR_15;

    const int VAR_16= VAR_0->p_mv_table[VAR_5][0];

    const int VAR_17= VAR_0->p_mv_table[VAR_5][1];

    const int VAR_18= VAR_0->pp_time;

    const int VAR_19= VAR_0->bp_time;

    const int VAR_20= VAR_18 - VAR_19;

    int VAR_21, VAR_22;

    int VAR_23, VAR_24, VAR_25, VAR_26;

    uint8_t *ref_picture= VAR_0->me_scratchpad - (VAR_1 + 1 + (VAR_2 + 1)*VAR_0->linesize)*16;

    int16_t (*mv_table)[2]= VAR_0->b_direct_mv_table;

    uint16_t *mv_penalty= VAR_0->mv_penalty[VAR_0->f_code] + MAX_MV; 



    

    VAR_8= (VAR_16*VAR_20)/VAR_18;

    VAR_9= (VAR_17*VAR_20)/VAR_18;

    VAR_12= (-VAR_16*VAR_19)/VAR_18;

    VAR_13= (-VAR_17*VAR_19)/VAR_18;

    VAR_14= VAR_15=0;

    VAR_7= check_bidir_mv(VAR_0, VAR_1, VAR_2, 

                          VAR_8, VAR_9,

                          VAR_12, VAR_13,

                          VAR_8, VAR_9,

                          VAR_12, VAR_13) - VAR_0->qscale;



    VAR_10= VAR_8 - VAR_16;

    VAR_11= VAR_9 - VAR_17;

    for(VAR_22=-1; VAR_22<2; VAR_22++){

        for(VAR_21=-1; VAR_21<2; VAR_21++){

            uint8_t *dest_y = VAR_0->me_scratchpad + (VAR_22+1)*VAR_0->linesize*16 + (VAR_21+1)*16;

            uint8_t *ptr;

            int VAR_27;

            int VAR_28, VAR_29;

            const int VAR_30= VAR_0->VAR_30;

            const int VAR_31= VAR_0->VAR_31;



            VAR_27 = ((VAR_9 & 1) << 1) | (VAR_8 & 1);

            VAR_28 = (VAR_1 + VAR_21) * 16 + (VAR_8 >> 1);

            VAR_29 = (VAR_2 + VAR_22) * 16 + (VAR_9 >> 1);

            VAR_28 = clip(VAR_28, -16, VAR_30);

            if (VAR_28 == VAR_30) VAR_27 &= ~1;

            VAR_29 = clip(VAR_29, -16, VAR_31);

            if (VAR_29 == VAR_31) VAR_27 &= ~2;



            ptr = VAR_0->last_picture[0] + (VAR_29 * VAR_0->linesize) + VAR_28;

            put_pixels_tab[VAR_27](dest_y    , ptr    , VAR_0->linesize, 16);

            put_pixels_tab[VAR_27](dest_y + 8, ptr + 8, VAR_0->linesize, 16);



            VAR_27 = ((VAR_11 & 1) << 1) | (VAR_10 & 1);

            VAR_28 = (VAR_1 + VAR_21) * 16 + (VAR_10 >> 1);

            VAR_29 = (VAR_2 + VAR_22) * 16 + (VAR_11 >> 1);

            VAR_28 = clip(VAR_28, -16, VAR_30);

            if (VAR_28 == VAR_30) VAR_27 &= ~1;

            VAR_29 = clip(VAR_29, -16, VAR_31);

            if (VAR_29 == VAR_31) VAR_27 &= ~2;



            avg_pixels_tab[VAR_27](dest_y    , ptr    , VAR_0->linesize, 16);

            avg_pixels_tab[VAR_27](dest_y + 8, ptr + 8, VAR_0->linesize, 16);

        }

    }



    VAR_3[0][0] = mv_table[VAR_5    ][0];

    VAR_3[0][1] = mv_table[VAR_5    ][1];

    VAR_3[1][0] = mv_table[VAR_5 - 1][0];

    VAR_3[1][1] = mv_table[VAR_5 - 1][1];



    

    if ((VAR_2 == 0 || VAR_0->first_slice_line || VAR_0->first_gob_line)) {

        VAR_3[4][0] = VAR_3[1][0];

        VAR_3[4][1] = VAR_3[1][1];

    } else {

        VAR_3[2][0] = mv_table[VAR_5 - VAR_4             ][0];

        VAR_3[2][1] = mv_table[VAR_5 - VAR_4             ][1];

        VAR_3[3][0] = mv_table[VAR_5 - VAR_4 + 1         ][0];

        VAR_3[3][1] = mv_table[VAR_5 - VAR_4 + 1         ][1];

    

        VAR_3[4][0]= mid_pred(VAR_3[1][0], VAR_3[2][0], VAR_3[3][0]);

        VAR_3[4][1]= mid_pred(VAR_3[1][1], VAR_3[2][1], VAR_3[3][1]);

    }

    VAR_6 = epzs_motion_search(VAR_0, &VAR_23, &VAR_24, VAR_3, 0, 0, -16, -16, 15, 15, ref_picture);

    if(VAR_23==0 && VAR_24==0) VAR_6=99999999; 

    if(VAR_7<VAR_6){ 

        VAR_6= VAR_7;

        VAR_23=0;

        VAR_24=0;

    }

#if 1

    VAR_25= VAR_23= VAR_23*2; 

    VAR_26= VAR_24= VAR_24*2;

    for(VAR_22=-1; VAR_22<2; VAR_22++){

        if(VAR_26+VAR_22 < -32) continue;

        for(VAR_21=-1; VAR_21<2; VAR_21++){

            if(VAR_21==0 && VAR_22==0) continue;

            if(VAR_25+VAR_21 < -32) continue;

            VAR_7= check_bidir_mv(VAR_0, VAR_1, VAR_2, 

                          VAR_25+VAR_21+VAR_8, VAR_26+VAR_22+VAR_9,

                          VAR_25+VAR_21+VAR_10, VAR_26+VAR_22+VAR_11,

                          VAR_25+VAR_21+VAR_8, VAR_26+VAR_22+VAR_9,

                          VAR_10, VAR_11) - VAR_0->qscale;

            

            if(VAR_7<VAR_6){

                VAR_6=VAR_7;

                VAR_23= VAR_25 + VAR_21;

                VAR_24= VAR_26 + VAR_22;

            }

        }

    }

#else

    VAR_23*=2; VAR_24*=2;

#endif

    if(VAR_23==0 && VAR_24==0){

        VAR_10= VAR_12;

        VAR_11= VAR_13;

    }



    VAR_0->b_direct_mv_table[VAR_5][0]= VAR_23;

    VAR_0->b_direct_mv_table[VAR_5][1]= VAR_24;

    VAR_0->b_direct_forw_mv_table[VAR_5][0]= VAR_8 + VAR_23;

    VAR_0->b_direct_forw_mv_table[VAR_5][1]= VAR_9 + VAR_24;

    VAR_0->b_direct_back_mv_table[VAR_5][0]= VAR_10 + VAR_23;

    VAR_0->b_direct_back_mv_table[VAR_5][1]= VAR_11 + VAR_24;

    return VAR_6;

}

static inline int FUNC_0(MpegEncContext * VAR_0,
int VAR_1, int VAR_2)
{ int VAR_3[6][2]; const int VAR_4 = VAR_0->mb_width + 2; const int VAR_5 = (VAR_2 + 1)*VAR_4 + VAR_1 + 1; int VAR_6, VAR_7; int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13; int VAR_14, VAR_15; const int VAR_16= VAR_0->p_mv_table[VAR_5][0]; const int VAR_17= VAR_0->p_mv_table[VAR_5][1]; const int VAR_18= VAR_0->pp_time; const int VAR_19= VAR_0->bp_time; const int VAR_20= VAR_18 - VAR_19; int VAR_21, VAR_22; int VAR_23, VAR_24, VAR_25, VAR_26; uint8_t *ref_picture= VAR_0->me_scratchpad - (VAR_1 + 1 + (VAR_2 + 1)*VAR_0->linesize)*16; int16_t (*mv_table)[2]= VAR_0->b_direct_mv_table; uint16_t *mv_penalty= VAR_0->mv_penalty[VAR_0->f_code] + MAX_MV; VAR_8= (VAR_16*VAR_20)/VAR_18; VAR_9= (VAR_17*VAR_20)/VAR_18; VAR_12= (-VAR_16*VAR_19)/VAR_18; VAR_13= (-VAR_17*VAR_19)/VAR_18; VAR_14= VAR_15=0; VAR_7= check_bidir_mv(VAR_0, VAR_1, VAR_2,
VAR_8, VAR_9,
VAR_12, VAR_13,
VAR_8, VAR_9,
VAR_12, VAR_13) - VAR_0->qscale; VAR_10= VAR_8 - VAR_16; VAR_11= VAR_9 - VAR_17; for(VAR_22=-1; VAR_22<2; VAR_22++){ for(VAR_21=-1; VAR_21<2; VAR_21++){ uint8_t *dest_y = VAR_0->me_scratchpad + (VAR_22+1)*VAR_0->linesize*16 + (VAR_21+1)*16; uint8_t *ptr; int VAR_27; int VAR_28, VAR_29; const int VAR_30= VAR_0->VAR_30; const int VAR_31= VAR_0->VAR_31; VAR_27 = ((VAR_9 & 1) << 1) | (VAR_8 & 1); VAR_28 = (VAR_1 + VAR_21) * 16 + (VAR_8 >> 1); VAR_29 = (VAR_2 + VAR_22) * 16 + (VAR_9 >> 1); VAR_28 = clip(VAR_28, -16, VAR_30); if (VAR_28 == VAR_30) VAR_27 &= ~1; VAR_29 = clip(VAR_29, -16, VAR_31); if (VAR_29 == VAR_31) VAR_27 &= ~2; ptr = VAR_0->last_picture[0] + (VAR_29 * VAR_0->linesize) + VAR_28; put_pixels_tab[VAR_27](dest_y    , ptr    , VAR_0->linesize, 16); put_pixels_tab[VAR_27](dest_y + 8, ptr + 8, VAR_0->linesize, 16); VAR_27 = ((VAR_11 & 1) << 1) | (VAR_10 & 1); VAR_28 = (VAR_1 + VAR_21) * 16 + (VAR_10 >> 1); VAR_29 = (VAR_2 + VAR_22) * 16 + (VAR_11 >> 1); VAR_28 = clip(VAR_28, -16, VAR_30); if (VAR_28 == VAR_30) VAR_27 &= ~1; VAR_29 = clip(VAR_29, -16, VAR_31); if (VAR_29 == VAR_31) VAR_27 &= ~2; avg_pixels_tab[VAR_27](dest_y    , ptr    , VAR_0->linesize, 16); avg_pixels_tab[VAR_27](dest_y + 8, ptr + 8, VAR_0->linesize, 16); } } VAR_3[0][0] = mv_table[VAR_5    ][0]; VAR_3[0][1] = mv_table[VAR_5    ][1]; VAR_3[1][0] = mv_table[VAR_5 - 1][0]; VAR_3[1][1] = mv_table[VAR_5 - 1][1]; if ((VAR_2 == 0 || VAR_0->first_slice_line || VAR_0->first_gob_line)) { VAR_3[4][0] = VAR_3[1][0]; VAR_3[4][1] = VAR_3[1][1]; } else { VAR_3[2][0] = mv_table[VAR_5 - VAR_4             ][0]; VAR_3[2][1] = mv_table[VAR_5 - VAR_4             ][1]; VAR_3[3][0] = mv_table[VAR_5 - VAR_4 + 1         ][0]; VAR_3[3][1] = mv_table[VAR_5 - VAR_4 + 1         ][1]; VAR_3[4][0]= mid_pred(VAR_3[1][0], VAR_3[2][0], VAR_3[3][0]); VAR_3[4][1]= mid_pred(VAR_3[1][1], VAR_3[2][1], VAR_3[3][1]); } VAR_6 = epzs_motion_search(VAR_0, &VAR_23, &VAR_24, VAR_3, 0, 0, -16, -16, 15, 15, ref_picture); if(VAR_23==0 && VAR_24==0) VAR_6=99999999; if(VAR_7<VAR_6){ VAR_6= VAR_7; VAR_23=0; VAR_24=0; } #if 1
VAR_25= VAR_23= VAR_23*2; VAR_26= VAR_24= VAR_24*2; for(VAR_22=-1; VAR_22<2; VAR_22++){ if(VAR_26+VAR_22 < -32) continue; for(VAR_21=-1; VAR_21<2; VAR_21++){ if(VAR_21==0 && VAR_22==0) continue; if(VAR_25+VAR_21 < -32) continue; VAR_7= check_bidir_mv(VAR_0, VAR_1, VAR_2,
VAR_25+VAR_21+VAR_8, VAR_26+VAR_22+VAR_9,
VAR_25+VAR_21+VAR_10, VAR_26+VAR_22+VAR_11,
VAR_25+VAR_21+VAR_8, VAR_26+VAR_22+VAR_9,
VAR_10, VAR_11) - VAR_0->qscale; if(VAR_7<VAR_6){ VAR_6=VAR_7; VAR_23= VAR_25 + VAR_21; VAR_24= VAR_26 + VAR_22; } } } #else
VAR_23*=2; VAR_24*=2; #endif
if(VAR_23==0 && VAR_24==0){ VAR_10= VAR_12; VAR_11= VAR_13; } VAR_0->b_direct_mv_table[VAR_5][0]= VAR_23; VAR_0->b_direct_mv_table[VAR_5][1]= VAR_24; VAR_0->b_direct_forw_mv_table[VAR_5][0]= VAR_8 + VAR_23; VAR_0->b_direct_forw_mv_table[VAR_5][1]= VAR_9 + VAR_24; VAR_0->b_direct_back_mv_table[VAR_5][0]= VAR_10 + VAR_23; VAR_0->b_direct_back_mv_table[VAR_5][1]= VAR_11 + VAR_24; return VAR_6; }