static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,

                                     int mvn, int r_x, int r_y, uint8_t* is_intra, int dir)

{

    MpegEncContext *s = &v->s;

    int xy, wrap, off = 0;

    int A[2], B[2], C[2];

    int px, py;

    int a_valid = 0, b_valid = 0, c_valid = 0;

    int field_a, field_b, field_c; // 0: same, 1: opposit

    int total_valid, num_samefield, num_oppfield;

    int pos_c, pos_b, n_adj;



    wrap = s->b8_stride;

    xy = s->block_index[n];



    if (s->mb_intra) {

        s->mv[0][n][0] = s->current_picture.motion_val[0][xy][0] = 0;

        s->mv[0][n][1] = s->current_picture.motion_val[0][xy][1] = 0;

        s->current_picture.motion_val[1][xy][0] = 0;

        s->current_picture.motion_val[1][xy][1] = 0;

        if (mvn == 1) { /* duplicate motion data for 1-MV block */

            s->current_picture.motion_val[0][xy + 1][0]        = 0;

            s->current_picture.motion_val[0][xy + 1][1]        = 0;

            s->current_picture.motion_val[0][xy + wrap][0]     = 0;

            s->current_picture.motion_val[0][xy + wrap][1]     = 0;

            s->current_picture.motion_val[0][xy + wrap + 1][0] = 0;

            s->current_picture.motion_val[0][xy + wrap + 1][1] = 0;

            v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;

            s->current_picture.motion_val[1][xy + 1][0]        = 0;

            s->current_picture.motion_val[1][xy + 1][1]        = 0;

            s->current_picture.motion_val[1][xy + wrap][0]     = 0;

            s->current_picture.motion_val[1][xy + wrap][1]     = 0;

            s->current_picture.motion_val[1][xy + wrap + 1][0] = 0;

            s->current_picture.motion_val[1][xy + wrap + 1][1] = 0;

        }

        return;

    }



    off = ((n == 0) || (n == 1)) ? 1 : -1;

    /* predict A */

    if (s->mb_x || (n == 1) || (n == 3)) {

        if ((v->blk_mv_type[xy]) // current block (MB) has a field MV

            || (!v->blk_mv_type[xy] && !v->blk_mv_type[xy - 1])) { // or both have frame MV

            A[0] = s->current_picture.motion_val[dir][xy - 1][0];

            A[1] = s->current_picture.motion_val[dir][xy - 1][1];

            a_valid = 1;

        } else { // current block has frame mv and cand. has field MV (so average)

            A[0] = (s->current_picture.motion_val[dir][xy - 1][0]

                    + s->current_picture.motion_val[dir][xy - 1 + off * wrap][0] + 1) >> 1;

            A[1] = (s->current_picture.motion_val[dir][xy - 1][1]

                    + s->current_picture.motion_val[dir][xy - 1 + off * wrap][1] + 1) >> 1;

            a_valid = 1;

        }

        if (!(n & 1) && v->is_intra[s->mb_x - 1]) {

            a_valid = 0;

            A[0] = A[1] = 0;

        }

    } else

        A[0] = A[1] = 0;

    /* Predict B and C */

    B[0] = B[1] = C[0] = C[1] = 0;

    if (n == 0 || n == 1 || v->blk_mv_type[xy]) {

        if (!s->first_slice_line) {

            if (!v->is_intra[s->mb_x - s->mb_stride]) {

                b_valid = 1;

                n_adj   = n | 2;

                pos_b   = s->block_index[n_adj] - 2 * wrap;

                if (v->blk_mv_type[pos_b] && v->blk_mv_type[xy]) {

                    n_adj = (n & 2) | (n & 1);

                }

                B[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][0];

                B[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][1];

                if (v->blk_mv_type[pos_b] && !v->blk_mv_type[xy]) {

                    B[0] = (B[0] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][0] + 1) >> 1;

                    B[1] = (B[1] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][1] + 1) >> 1;

                }

            }

            if (s->mb_width > 1) {

                if (!v->is_intra[s->mb_x - s->mb_stride + 1]) {

                    c_valid = 1;

                    n_adj   = 2;

                    pos_c   = s->block_index[2] - 2 * wrap + 2;

                    if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) {

                        n_adj = n & 2;

                    }

                    C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][0];

                    C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][1];

                    if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) {

                        C[0] = (1 + C[0] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][0])) >> 1;

                        C[1] = (1 + C[1] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][1])) >> 1;

                    }

                    if (s->mb_x == s->mb_width - 1) {

                        if (!v->is_intra[s->mb_x - s->mb_stride - 1]) {

                            c_valid = 1;

                            n_adj   = 3;

                            pos_c   = s->block_index[3] - 2 * wrap - 2;

                            if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) {

                                n_adj = n | 1;

                            }

                            C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][0];

                            C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][1];

                            if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) {

                                C[0] = (1 + C[0] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][0]) >> 1;

                                C[1] = (1 + C[1] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][1]) >> 1;

                            }

                        } else

                            c_valid = 0;

                    }

                }

            }

        }

    } else {

        pos_b   = s->block_index[1];

        b_valid = 1;

        B[0]    = s->current_picture.motion_val[dir][pos_b][0];

        B[1]    = s->current_picture.motion_val[dir][pos_b][1];

        pos_c   = s->block_index[0];

        c_valid = 1;

        C[0]    = s->current_picture.motion_val[dir][pos_c][0];

        C[1]    = s->current_picture.motion_val[dir][pos_c][1];

    }



    total_valid = a_valid + b_valid + c_valid;

    // check if predictor A is out of bounds

    if (!s->mb_x && !(n == 1 || n == 3)) {

        A[0] = A[1] = 0;

    }

    // check if predictor B is out of bounds

    if ((s->first_slice_line && v->blk_mv_type[xy]) || (s->first_slice_line && !(n & 2))) {

        B[0] = B[1] = C[0] = C[1] = 0;

    }

    if (!v->blk_mv_type[xy]) {

        if (s->mb_width == 1) {

            px = B[0];

            py = B[1];

        } else {

            if (total_valid >= 2) {

                px = mid_pred(A[0], B[0], C[0]);

                py = mid_pred(A[1], B[1], C[1]);

            } else if (total_valid) {

                if      (a_valid) { px = A[0]; py = A[1]; }

                else if (b_valid) { px = B[0]; py = B[1]; }

                else if (c_valid) { px = C[0]; py = C[1]; }

                else av_assert2(0);

            } else

                px = py = 0;

        }

    } else {

        if (a_valid)

            field_a = (A[1] & 4) ? 1 : 0;

        else

            field_a = 0;

        if (b_valid)

            field_b = (B[1] & 4) ? 1 : 0;

        else

            field_b = 0;

        if (c_valid)

            field_c = (C[1] & 4) ? 1 : 0;

        else

            field_c = 0;



        num_oppfield  = field_a + field_b + field_c;

        num_samefield = total_valid - num_oppfield;

        if (total_valid == 3) {

            if ((num_samefield == 3) || (num_oppfield == 3)) {

                px = mid_pred(A[0], B[0], C[0]);

                py = mid_pred(A[1], B[1], C[1]);

            } else if (num_samefield >= num_oppfield) {

                /* take one MV from same field set depending on priority

                the check for B may not be necessary */

                px = !field_a ? A[0] : B[0];

                py = !field_a ? A[1] : B[1];

            } else {

                px =  field_a ? A[0] : B[0];

                py =  field_a ? A[1] : B[1];

            }

        } else if (total_valid == 2) {

            if (num_samefield >= num_oppfield) {

                if (!field_a && a_valid) {

                    px = A[0];

                    py = A[1];

                } else if (!field_b && b_valid) {

                    px = B[0];

                    py = B[1];

                } else if (c_valid) {

                    px = C[0];

                    py = C[1];

                } else px = py = 0;

            } else {

                if (field_a && a_valid) {

                    px = A[0];

                    py = A[1];

                } else if (field_b && b_valid) {

                    px = B[0];

                    py = B[1];

                } else if (c_valid) {

                    px = C[0];

                    py = C[1];

                } else px = py = 0;

            }

        } else if (total_valid == 1) {

            px = (a_valid) ? A[0] : ((b_valid) ? B[0] : C[0]);

            py = (a_valid) ? A[1] : ((b_valid) ? B[1] : C[1]);

        } else

            px = py = 0;

    }



    /* store MV using signed modulus of MV range defined in 4.11 */

    s->mv[dir][n][0] = s->current_picture.motion_val[dir][xy][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;

    s->mv[dir][n][1] = s->current_picture.motion_val[dir][xy][1] = ((py + dmv_y + r_y) & ((r_y << 1) - 1)) - r_y;

    if (mvn == 1) { /* duplicate motion data for 1-MV block */

        s->current_picture.motion_val[dir][xy +    1    ][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy +    1    ][1] = s->current_picture.motion_val[dir][xy][1];

        s->current_picture.motion_val[dir][xy + wrap    ][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy + wrap    ][1] = s->current_picture.motion_val[dir][xy][1];

        s->current_picture.motion_val[dir][xy + wrap + 1][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy + wrap + 1][1] = s->current_picture.motion_val[dir][xy][1];

    } else if (mvn == 2) { /* duplicate motion data for 2-Field MV block */

        s->current_picture.motion_val[dir][xy + 1][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy + 1][1] = s->current_picture.motion_val[dir][xy][1];

        s->mv[dir][n + 1][0] = s->mv[dir][n][0];

        s->mv[dir][n + 1][1] = s->mv[dir][n][1];

    }

}

static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,

                                     int mvn, int r_x, int r_y, uint8_t* is_intra, int dir)

{

    MpegEncContext *s = &v->s;

    int xy, wrap, off = 0;

    int A[2], B[2], C[2];

    int px, py;

    int a_valid = 0, b_valid = 0, c_valid = 0;

    int field_a, field_b, field_c; 

    int total_valid, num_samefield, num_oppfield;

    int pos_c, pos_b, n_adj;



    wrap = s->b8_stride;

    xy = s->block_index[n];



    if (s->mb_intra) {

        s->mv[0][n][0] = s->current_picture.motion_val[0][xy][0] = 0;

        s->mv[0][n][1] = s->current_picture.motion_val[0][xy][1] = 0;

        s->current_picture.motion_val[1][xy][0] = 0;

        s->current_picture.motion_val[1][xy][1] = 0;

        if (mvn == 1) { 

            s->current_picture.motion_val[0][xy + 1][0]        = 0;

            s->current_picture.motion_val[0][xy + 1][1]        = 0;

            s->current_picture.motion_val[0][xy + wrap][0]     = 0;

            s->current_picture.motion_val[0][xy + wrap][1]     = 0;

            s->current_picture.motion_val[0][xy + wrap + 1][0] = 0;

            s->current_picture.motion_val[0][xy + wrap + 1][1] = 0;

            v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;

            s->current_picture.motion_val[1][xy + 1][0]        = 0;

            s->current_picture.motion_val[1][xy + 1][1]        = 0;

            s->current_picture.motion_val[1][xy + wrap][0]     = 0;

            s->current_picture.motion_val[1][xy + wrap][1]     = 0;

            s->current_picture.motion_val[1][xy + wrap + 1][0] = 0;

            s->current_picture.motion_val[1][xy + wrap + 1][1] = 0;

        }

        return;

    }



    off = ((n == 0) || (n == 1)) ? 1 : -1;

    

    if (s->mb_x || (n == 1) || (n == 3)) {

        if ((v->blk_mv_type[xy]) 

            || (!v->blk_mv_type[xy] && !v->blk_mv_type[xy - 1])) { 

            A[0] = s->current_picture.motion_val[dir][xy - 1][0];

            A[1] = s->current_picture.motion_val[dir][xy - 1][1];

            a_valid = 1;

        } else { 

            A[0] = (s->current_picture.motion_val[dir][xy - 1][0]

                    + s->current_picture.motion_val[dir][xy - 1 + off * wrap][0] + 1) >> 1;

            A[1] = (s->current_picture.motion_val[dir][xy - 1][1]

                    + s->current_picture.motion_val[dir][xy - 1 + off * wrap][1] + 1) >> 1;

            a_valid = 1;

        }

        if (!(n & 1) && v->is_intra[s->mb_x - 1]) {

            a_valid = 0;

            A[0] = A[1] = 0;

        }

    } else

        A[0] = A[1] = 0;

    

    B[0] = B[1] = C[0] = C[1] = 0;

    if (n == 0 || n == 1 || v->blk_mv_type[xy]) {

        if (!s->first_slice_line) {

            if (!v->is_intra[s->mb_x - s->mb_stride]) {

                b_valid = 1;

                n_adj   = n | 2;

                pos_b   = s->block_index[n_adj] - 2 * wrap;

                if (v->blk_mv_type[pos_b] && v->blk_mv_type[xy]) {

                    n_adj = (n & 2) | (n & 1);

                }

                B[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][0];

                B[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][1];

                if (v->blk_mv_type[pos_b] && !v->blk_mv_type[xy]) {

                    B[0] = (B[0] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][0] + 1) >> 1;

                    B[1] = (B[1] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][1] + 1) >> 1;

                }

            }

            if (s->mb_width > 1) {

                if (!v->is_intra[s->mb_x - s->mb_stride + 1]) {

                    c_valid = 1;

                    n_adj   = 2;

                    pos_c   = s->block_index[2] - 2 * wrap + 2;

                    if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) {

                        n_adj = n & 2;

                    }

                    C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][0];

                    C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][1];

                    if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) {

                        C[0] = (1 + C[0] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][0])) >> 1;

                        C[1] = (1 + C[1] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][1])) >> 1;

                    }

                    if (s->mb_x == s->mb_width - 1) {

                        if (!v->is_intra[s->mb_x - s->mb_stride - 1]) {

                            c_valid = 1;

                            n_adj   = 3;

                            pos_c   = s->block_index[3] - 2 * wrap - 2;

                            if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) {

                                n_adj = n | 1;

                            }

                            C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][0];

                            C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][1];

                            if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) {

                                C[0] = (1 + C[0] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][0]) >> 1;

                                C[1] = (1 + C[1] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][1]) >> 1;

                            }

                        } else

                            c_valid = 0;

                    }

                }

            }

        }

    } else {

        pos_b   = s->block_index[1];

        b_valid = 1;

        B[0]    = s->current_picture.motion_val[dir][pos_b][0];

        B[1]    = s->current_picture.motion_val[dir][pos_b][1];

        pos_c   = s->block_index[0];

        c_valid = 1;

        C[0]    = s->current_picture.motion_val[dir][pos_c][0];

        C[1]    = s->current_picture.motion_val[dir][pos_c][1];

    }



    total_valid = a_valid + b_valid + c_valid;

    

    if (!s->mb_x && !(n == 1 || n == 3)) {

        A[0] = A[1] = 0;

    }

    

    if ((s->first_slice_line && v->blk_mv_type[xy]) || (s->first_slice_line && !(n & 2))) {

        B[0] = B[1] = C[0] = C[1] = 0;

    }

    if (!v->blk_mv_type[xy]) {

        if (s->mb_width == 1) {

            px = B[0];

            py = B[1];

        } else {

            if (total_valid >= 2) {

                px = mid_pred(A[0], B[0], C[0]);

                py = mid_pred(A[1], B[1], C[1]);

            } else if (total_valid) {

                if      (a_valid) { px = A[0]; py = A[1]; }

                else if (b_valid) { px = B[0]; py = B[1]; }

                else if (c_valid) { px = C[0]; py = C[1]; }

                else av_assert2(0);

            } else

                px = py = 0;

        }

    } else {

        if (a_valid)

            field_a = (A[1] & 4) ? 1 : 0;

        else

            field_a = 0;

        if (b_valid)

            field_b = (B[1] & 4) ? 1 : 0;

        else

            field_b = 0;

        if (c_valid)

            field_c = (C[1] & 4) ? 1 : 0;

        else

            field_c = 0;



        num_oppfield  = field_a + field_b + field_c;

        num_samefield = total_valid - num_oppfield;

        if (total_valid == 3) {

            if ((num_samefield == 3) || (num_oppfield == 3)) {

                px = mid_pred(A[0], B[0], C[0]);

                py = mid_pred(A[1], B[1], C[1]);

            } else if (num_samefield >= num_oppfield) {

                



                px = !field_a ? A[0] : B[0];

                py = !field_a ? A[1] : B[1];

            } else {

                px =  field_a ? A[0] : B[0];

                py =  field_a ? A[1] : B[1];

            }

        } else if (total_valid == 2) {

            if (num_samefield >= num_oppfield) {

                if (!field_a && a_valid) {

                    px = A[0];

                    py = A[1];

                } else if (!field_b && b_valid) {

                    px = B[0];

                    py = B[1];

                } else if (c_valid) {

                    px = C[0];

                    py = C[1];

                } else px = py = 0;

            } else {

                if (field_a && a_valid) {

                    px = A[0];

                    py = A[1];

                } else if (field_b && b_valid) {

                    px = B[0];

                    py = B[1];

                } else if (c_valid) {

                    px = C[0];

                    py = C[1];

                } else px = py = 0;

            }

        } else if (total_valid == 1) {

            px = (a_valid) ? A[0] : ((b_valid) ? B[0] : C[0]);

            py = (a_valid) ? A[1] : ((b_valid) ? B[1] : C[1]);

        } else

            px = py = 0;

    }



    

    s->mv[dir][n][0] = s->current_picture.motion_val[dir][xy][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;

    s->mv[dir][n][1] = s->current_picture.motion_val[dir][xy][1] = ((py + dmv_y + r_y) & ((r_y << 1) - 1)) - r_y;

    if (mvn == 1) { 

        s->current_picture.motion_val[dir][xy +    1    ][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy +    1    ][1] = s->current_picture.motion_val[dir][xy][1];

        s->current_picture.motion_val[dir][xy + wrap    ][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy + wrap    ][1] = s->current_picture.motion_val[dir][xy][1];

        s->current_picture.motion_val[dir][xy + wrap + 1][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy + wrap + 1][1] = s->current_picture.motion_val[dir][xy][1];

    } else if (mvn == 2) { 

        s->current_picture.motion_val[dir][xy + 1][0] = s->current_picture.motion_val[dir][xy][0];

        s->current_picture.motion_val[dir][xy + 1][1] = s->current_picture.motion_val[dir][xy][1];

        s->mv[dir][n + 1][0] = s->mv[dir][n][0];

        s->mv[dir][n + 1][1] = s->mv[dir][n][1];

    }

}

    int px, py;             } else                 px = py = 0;                 } else px = py = 0;         } else             px = py = 0;
static inline void FUNC_0(VC1Context *VAR_0, int VAR_1, int VAR_2, int VAR_3,

                                     int VAR_4, int VAR_5, int VAR_6, uint8_t* VAR_7, int VAR_8)

{

    MpegEncContext *s = &VAR_0->s;

    int VAR_9, VAR_10, VAR_11 = 0;

    int VAR_12[2], VAR_13[2], VAR_14[2];

    int VAR_15, VAR_16;

    int VAR_17 = 0, VAR_18 = 0, VAR_19 = 0;

    int VAR_20, VAR_21, VAR_22; 

    int VAR_23, VAR_24, VAR_25;

    int VAR_26, VAR_27, VAR_28;



    VAR_10 = s->b8_stride;

    VAR_9 = s->block_index[VAR_1];



    if (s->mb_intra) {

        s->mv[0][VAR_1][0] = s->current_picture.motion_val[0][VAR_9][0] = 0;

        s->mv[0][VAR_1][1] = s->current_picture.motion_val[0][VAR_9][1] = 0;

        s->current_picture.motion_val[1][VAR_9][0] = 0;

        s->current_picture.motion_val[1][VAR_9][1] = 0;

        if (VAR_4 == 1) { 

            s->current_picture.motion_val[0][VAR_9 + 1][0]        = 0;

            s->current_picture.motion_val[0][VAR_9 + 1][1]        = 0;

            s->current_picture.motion_val[0][VAR_9 + VAR_10][0]     = 0;

            s->current_picture.motion_val[0][VAR_9 + VAR_10][1]     = 0;

            s->current_picture.motion_val[0][VAR_9 + VAR_10 + 1][0] = 0;

            s->current_picture.motion_val[0][VAR_9 + VAR_10 + 1][1] = 0;

            VAR_0->luma_mv[s->mb_x][0] = VAR_0->luma_mv[s->mb_x][1] = 0;

            s->current_picture.motion_val[1][VAR_9 + 1][0]        = 0;

            s->current_picture.motion_val[1][VAR_9 + 1][1]        = 0;

            s->current_picture.motion_val[1][VAR_9 + VAR_10][0]     = 0;

            s->current_picture.motion_val[1][VAR_9 + VAR_10][1]     = 0;

            s->current_picture.motion_val[1][VAR_9 + VAR_10 + 1][0] = 0;

            s->current_picture.motion_val[1][VAR_9 + VAR_10 + 1][1] = 0;

        }

        return;

    }



    VAR_11 = ((VAR_1 == 0) || (VAR_1 == 1)) ? 1 : -1;

    

    if (s->mb_x || (VAR_1 == 1) || (VAR_1 == 3)) {

        if ((VAR_0->blk_mv_type[VAR_9]) 

            || (!VAR_0->blk_mv_type[VAR_9] && !VAR_0->blk_mv_type[VAR_9 - 1])) { 

            VAR_12[0] = s->current_picture.motion_val[VAR_8][VAR_9 - 1][0];

            VAR_12[1] = s->current_picture.motion_val[VAR_8][VAR_9 - 1][1];

            VAR_17 = 1;

        } else { 

            VAR_12[0] = (s->current_picture.motion_val[VAR_8][VAR_9 - 1][0]

                    + s->current_picture.motion_val[VAR_8][VAR_9 - 1 + VAR_11 * VAR_10][0] + 1) >> 1;

            VAR_12[1] = (s->current_picture.motion_val[VAR_8][VAR_9 - 1][1]

                    + s->current_picture.motion_val[VAR_8][VAR_9 - 1 + VAR_11 * VAR_10][1] + 1) >> 1;

            VAR_17 = 1;

        }

        if (!(VAR_1 & 1) && VAR_0->VAR_7[s->mb_x - 1]) {

            VAR_17 = 0;

            VAR_12[0] = VAR_12[1] = 0;

        }

    } else

        VAR_12[0] = VAR_12[1] = 0;

    

    VAR_13[0] = VAR_13[1] = VAR_14[0] = VAR_14[1] = 0;

    if (VAR_1 == 0 || VAR_1 == 1 || VAR_0->blk_mv_type[VAR_9]) {

        if (!s->first_slice_line) {

            if (!VAR_0->VAR_7[s->mb_x - s->mb_stride]) {

                VAR_18 = 1;

                VAR_28   = VAR_1 | 2;

                VAR_27   = s->block_index[VAR_28] - 2 * VAR_10;

                if (VAR_0->blk_mv_type[VAR_27] && VAR_0->blk_mv_type[VAR_9]) {

                    VAR_28 = (VAR_1 & 2) | (VAR_1 & 1);

                }

                VAR_13[0] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10][0];

                VAR_13[1] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10][1];

                if (VAR_0->blk_mv_type[VAR_27] && !VAR_0->blk_mv_type[VAR_9]) {

                    VAR_13[0] = (VAR_13[0] + s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10][0] + 1) >> 1;

                    VAR_13[1] = (VAR_13[1] + s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10][1] + 1) >> 1;

                }

            }

            if (s->mb_width > 1) {

                if (!VAR_0->VAR_7[s->mb_x - s->mb_stride + 1]) {

                    VAR_19 = 1;

                    VAR_28   = 2;

                    VAR_26   = s->block_index[2] - 2 * VAR_10 + 2;

                    if (VAR_0->blk_mv_type[VAR_26] && VAR_0->blk_mv_type[VAR_9]) {

                        VAR_28 = VAR_1 & 2;

                    }

                    VAR_14[0] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 + 2][0];

                    VAR_14[1] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 + 2][1];

                    if (VAR_0->blk_mv_type[VAR_26] && !VAR_0->blk_mv_type[VAR_9]) {

                        VAR_14[0] = (1 + VAR_14[0] + (s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10 + 2][0])) >> 1;

                        VAR_14[1] = (1 + VAR_14[1] + (s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10 + 2][1])) >> 1;

                    }

                    if (s->mb_x == s->mb_width - 1) {

                        if (!VAR_0->VAR_7[s->mb_x - s->mb_stride - 1]) {

                            VAR_19 = 1;

                            VAR_28   = 3;

                            VAR_26   = s->block_index[3] - 2 * VAR_10 - 2;

                            if (VAR_0->blk_mv_type[VAR_26] && VAR_0->blk_mv_type[VAR_9]) {

                                VAR_28 = VAR_1 | 1;

                            }

                            VAR_14[0] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 - 2][0];

                            VAR_14[1] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 - 2][1];

                            if (VAR_0->blk_mv_type[VAR_26] && !VAR_0->blk_mv_type[VAR_9]) {

                                VAR_14[0] = (1 + VAR_14[0] + s->current_picture.motion_val[VAR_8][s->block_index[1] - 2 * VAR_10 - 2][0]) >> 1;

                                VAR_14[1] = (1 + VAR_14[1] + s->current_picture.motion_val[VAR_8][s->block_index[1] - 2 * VAR_10 - 2][1]) >> 1;

                            }

                        } else

                            VAR_19 = 0;

                    }

                }

            }

        }

    } else {

        VAR_27   = s->block_index[1];

        VAR_18 = 1;

        VAR_13[0]    = s->current_picture.motion_val[VAR_8][VAR_27][0];

        VAR_13[1]    = s->current_picture.motion_val[VAR_8][VAR_27][1];

        VAR_26   = s->block_index[0];

        VAR_19 = 1;

        VAR_14[0]    = s->current_picture.motion_val[VAR_8][VAR_26][0];

        VAR_14[1]    = s->current_picture.motion_val[VAR_8][VAR_26][1];

    }



    VAR_23 = VAR_17 + VAR_18 + VAR_19;

    

    if (!s->mb_x && !(VAR_1 == 1 || VAR_1 == 3)) {

        VAR_12[0] = VAR_12[1] = 0;

    }

    

    if ((s->first_slice_line && VAR_0->blk_mv_type[VAR_9]) || (s->first_slice_line && !(VAR_1 & 2))) {

        VAR_13[0] = VAR_13[1] = VAR_14[0] = VAR_14[1] = 0;

    }

    if (!VAR_0->blk_mv_type[VAR_9]) {

        if (s->mb_width == 1) {

            VAR_15 = VAR_13[0];

            VAR_16 = VAR_13[1];

        } else {

            if (VAR_23 >= 2) {

                VAR_15 = mid_pred(VAR_12[0], VAR_13[0], VAR_14[0]);

                VAR_16 = mid_pred(VAR_12[1], VAR_13[1], VAR_14[1]);

            } else if (VAR_23) {

                if      (VAR_17) { VAR_15 = VAR_12[0]; VAR_16 = VAR_12[1]; }

                else if (VAR_18) { VAR_15 = VAR_13[0]; VAR_16 = VAR_13[1]; }

                else if (VAR_19) { VAR_15 = VAR_14[0]; VAR_16 = VAR_14[1]; }

                else av_assert2(0);

            } else

                VAR_15 = VAR_16 = 0;

        }

    } else {

        if (VAR_17)

            VAR_20 = (VAR_12[1] & 4) ? 1 : 0;

        else

            VAR_20 = 0;

        if (VAR_18)

            VAR_21 = (VAR_13[1] & 4) ? 1 : 0;

        else

            VAR_21 = 0;

        if (VAR_19)

            VAR_22 = (VAR_14[1] & 4) ? 1 : 0;

        else

            VAR_22 = 0;



        VAR_25  = VAR_20 + VAR_21 + VAR_22;

        VAR_24 = VAR_23 - VAR_25;

        if (VAR_23 == 3) {

            if ((VAR_24 == 3) || (VAR_25 == 3)) {

                VAR_15 = mid_pred(VAR_12[0], VAR_13[0], VAR_14[0]);

                VAR_16 = mid_pred(VAR_12[1], VAR_13[1], VAR_14[1]);

            } else if (VAR_24 >= VAR_25) {

                



                VAR_15 = !VAR_20 ? VAR_12[0] : VAR_13[0];

                VAR_16 = !VAR_20 ? VAR_12[1] : VAR_13[1];

            } else {

                VAR_15 =  VAR_20 ? VAR_12[0] : VAR_13[0];

                VAR_16 =  VAR_20 ? VAR_12[1] : VAR_13[1];

            }

        } else if (VAR_23 == 2) {

            if (VAR_24 >= VAR_25) {

                if (!VAR_20 && VAR_17) {

                    VAR_15 = VAR_12[0];

                    VAR_16 = VAR_12[1];

                } else if (!VAR_21 && VAR_18) {

                    VAR_15 = VAR_13[0];

                    VAR_16 = VAR_13[1];

                } else if (VAR_19) {

                    VAR_15 = VAR_14[0];

                    VAR_16 = VAR_14[1];

                } else VAR_15 = VAR_16 = 0;

            } else {

                if (VAR_20 && VAR_17) {

                    VAR_15 = VAR_12[0];

                    VAR_16 = VAR_12[1];

                } else if (VAR_21 && VAR_18) {

                    VAR_15 = VAR_13[0];

                    VAR_16 = VAR_13[1];

                } else if (VAR_19) {

                    VAR_15 = VAR_14[0];

                    VAR_16 = VAR_14[1];

                } else VAR_15 = VAR_16 = 0;

            }

        } else if (VAR_23 == 1) {

            VAR_15 = (VAR_17) ? VAR_12[0] : ((VAR_18) ? VAR_13[0] : VAR_14[0]);

            VAR_16 = (VAR_17) ? VAR_12[1] : ((VAR_18) ? VAR_13[1] : VAR_14[1]);

        } else

            VAR_15 = VAR_16 = 0;

    }



    

    s->mv[VAR_8][VAR_1][0] = s->current_picture.motion_val[VAR_8][VAR_9][0] = ((VAR_15 + VAR_2 + VAR_5) & ((VAR_5 << 1) - 1)) - VAR_5;

    s->mv[VAR_8][VAR_1][1] = s->current_picture.motion_val[VAR_8][VAR_9][1] = ((VAR_16 + VAR_3 + VAR_6) & ((VAR_6 << 1) - 1)) - VAR_6;

    if (VAR_4 == 1) { 

        s->current_picture.motion_val[VAR_8][VAR_9 +    1    ][0] = s->current_picture.motion_val[VAR_8][VAR_9][0];

        s->current_picture.motion_val[VAR_8][VAR_9 +    1    ][1] = s->current_picture.motion_val[VAR_8][VAR_9][1];

        s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10    ][0] = s->current_picture.motion_val[VAR_8][VAR_9][0];

        s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10    ][1] = s->current_picture.motion_val[VAR_8][VAR_9][1];

        s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10 + 1][0] = s->current_picture.motion_val[VAR_8][VAR_9][0];

        s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10 + 1][1] = s->current_picture.motion_val[VAR_8][VAR_9][1];

    } else if (VAR_4 == 2) { 

        s->current_picture.motion_val[VAR_8][VAR_9 + 1][0] = s->current_picture.motion_val[VAR_8][VAR_9][0];

        s->current_picture.motion_val[VAR_8][VAR_9 + 1][1] = s->current_picture.motion_val[VAR_8][VAR_9][1];

        s->mv[VAR_8][VAR_1 + 1][0] = s->mv[VAR_8][VAR_1][0];

        s->mv[VAR_8][VAR_1 + 1][1] = s->mv[VAR_8][VAR_1][1];

    }

}

static inline void FUNC_0(VC1Context *VAR_0, int VAR_1, int VAR_2, int VAR_3,
int VAR_4, int VAR_5, int VAR_6, uint8_t* VAR_7, int VAR_8)
{ MpegEncContext *s = &VAR_0->s; int VAR_9, VAR_10, VAR_11 = 0; int VAR_12[2], VAR_13[2], VAR_14[2]; int VAR_15, VAR_16; int VAR_17 = 0, VAR_18 = 0, VAR_19 = 0; int VAR_20, VAR_21, VAR_22; int VAR_23, VAR_24, VAR_25; int VAR_26, VAR_27, VAR_28; VAR_10 = s->b8_stride; VAR_9 = s->block_index[VAR_1]; if (s->mb_intra) { s->mv[0][VAR_1][0] = s->current_picture.motion_val[0][VAR_9][0] = 0; s->mv[0][VAR_1][1] = s->current_picture.motion_val[0][VAR_9][1] = 0; s->current_picture.motion_val[1][VAR_9][0] = 0; s->current_picture.motion_val[1][VAR_9][1] = 0; if (VAR_4 == 1) { s->current_picture.motion_val[0][VAR_9 + 1][0]        = 0; s->current_picture.motion_val[0][VAR_9 + 1][1]        = 0; s->current_picture.motion_val[0][VAR_9 + VAR_10][0]     = 0; s->current_picture.motion_val[0][VAR_9 + VAR_10][1]     = 0; s->current_picture.motion_val[0][VAR_9 + VAR_10 + 1][0] = 0; s->current_picture.motion_val[0][VAR_9 + VAR_10 + 1][1] = 0; VAR_0->luma_mv[s->mb_x][0] = VAR_0->luma_mv[s->mb_x][1] = 0; s->current_picture.motion_val[1][VAR_9 + 1][0]        = 0; s->current_picture.motion_val[1][VAR_9 + 1][1]        = 0; s->current_picture.motion_val[1][VAR_9 + VAR_10][0]     = 0; s->current_picture.motion_val[1][VAR_9 + VAR_10][1]     = 0; s->current_picture.motion_val[1][VAR_9 + VAR_10 + 1][0] = 0; s->current_picture.motion_val[1][VAR_9 + VAR_10 + 1][1] = 0; } return; } VAR_11 = ((VAR_1 == 0) || (VAR_1 == 1)) ? 1 : -1; if (s->mb_x || (VAR_1 == 1) || (VAR_1 == 3)) { if ((VAR_0->blk_mv_type[VAR_9])
|| (!VAR_0->blk_mv_type[VAR_9] && !VAR_0->blk_mv_type[VAR_9 - 1])) { VAR_12[0] = s->current_picture.motion_val[VAR_8][VAR_9 - 1][0]; VAR_12[1] = s->current_picture.motion_val[VAR_8][VAR_9 - 1][1]; VAR_17 = 1; } else { VAR_12[0] = (s->current_picture.motion_val[VAR_8][VAR_9 - 1][0]
+ s->current_picture.motion_val[VAR_8][VAR_9 - 1 + VAR_11 * VAR_10][0] + 1) >> 1; VAR_12[1] = (s->current_picture.motion_val[VAR_8][VAR_9 - 1][1]
+ s->current_picture.motion_val[VAR_8][VAR_9 - 1 + VAR_11 * VAR_10][1] + 1) >> 1; VAR_17 = 1; } if (!(VAR_1 & 1) && VAR_0->VAR_7[s->mb_x - 1]) { VAR_17 = 0; VAR_12[0] = VAR_12[1] = 0; } } else VAR_12[0] = VAR_12[1] = 0; VAR_13[0] = VAR_13[1] = VAR_14[0] = VAR_14[1] = 0; if (VAR_1 == 0 || VAR_1 == 1 || VAR_0->blk_mv_type[VAR_9]) { if (!s->first_slice_line) { if (!VAR_0->VAR_7[s->mb_x - s->mb_stride]) { VAR_18 = 1; VAR_28   = VAR_1 | 2; VAR_27   = s->block_index[VAR_28] - 2 * VAR_10; if (VAR_0->blk_mv_type[VAR_27] && VAR_0->blk_mv_type[VAR_9]) { VAR_28 = (VAR_1 & 2) | (VAR_1 & 1); } VAR_13[0] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10][0]; VAR_13[1] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10][1]; if (VAR_0->blk_mv_type[VAR_27] && !VAR_0->blk_mv_type[VAR_9]) { VAR_13[0] = (VAR_13[0] + s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10][0] + 1) >> 1; VAR_13[1] = (VAR_13[1] + s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10][1] + 1) >> 1; } } if (s->mb_width > 1) { if (!VAR_0->VAR_7[s->mb_x - s->mb_stride + 1]) { VAR_19 = 1; VAR_28   = 2; VAR_26   = s->block_index[2] - 2 * VAR_10 + 2; if (VAR_0->blk_mv_type[VAR_26] && VAR_0->blk_mv_type[VAR_9]) { VAR_28 = VAR_1 & 2; } VAR_14[0] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 + 2][0]; VAR_14[1] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 + 2][1]; if (VAR_0->blk_mv_type[VAR_26] && !VAR_0->blk_mv_type[VAR_9]) { VAR_14[0] = (1 + VAR_14[0] + (s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10 + 2][0])) >> 1; VAR_14[1] = (1 + VAR_14[1] + (s->current_picture.motion_val[VAR_8][s->block_index[VAR_28 ^ 2] - 2 * VAR_10 + 2][1])) >> 1; } if (s->mb_x == s->mb_width - 1) { if (!VAR_0->VAR_7[s->mb_x - s->mb_stride - 1]) { VAR_19 = 1; VAR_28   = 3; VAR_26   = s->block_index[3] - 2 * VAR_10 - 2; if (VAR_0->blk_mv_type[VAR_26] && VAR_0->blk_mv_type[VAR_9]) { VAR_28 = VAR_1 | 1; } VAR_14[0] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 - 2][0]; VAR_14[1] = s->current_picture.motion_val[VAR_8][s->block_index[VAR_28] - 2 * VAR_10 - 2][1]; if (VAR_0->blk_mv_type[VAR_26] && !VAR_0->blk_mv_type[VAR_9]) { VAR_14[0] = (1 + VAR_14[0] + s->current_picture.motion_val[VAR_8][s->block_index[1] - 2 * VAR_10 - 2][0]) >> 1; VAR_14[1] = (1 + VAR_14[1] + s->current_picture.motion_val[VAR_8][s->block_index[1] - 2 * VAR_10 - 2][1]) >> 1; } } else VAR_19 = 0; } } } } } else { VAR_27   = s->block_index[1]; VAR_18 = 1; VAR_13[0]    = s->current_picture.motion_val[VAR_8][VAR_27][0]; VAR_13[1]    = s->current_picture.motion_val[VAR_8][VAR_27][1]; VAR_26   = s->block_index[0]; VAR_19 = 1; VAR_14[0]    = s->current_picture.motion_val[VAR_8][VAR_26][0]; VAR_14[1]    = s->current_picture.motion_val[VAR_8][VAR_26][1]; } VAR_23 = VAR_17 + VAR_18 + VAR_19; if (!s->mb_x && !(VAR_1 == 1 || VAR_1 == 3)) { VAR_12[0] = VAR_12[1] = 0; } if ((s->first_slice_line && VAR_0->blk_mv_type[VAR_9]) || (s->first_slice_line && !(VAR_1 & 2))) { VAR_13[0] = VAR_13[1] = VAR_14[0] = VAR_14[1] = 0; } if (!VAR_0->blk_mv_type[VAR_9]) { if (s->mb_width == 1) { VAR_15 = VAR_13[0]; VAR_16 = VAR_13[1]; } else { if (VAR_23 >= 2) { VAR_15 = mid_pred(VAR_12[0], VAR_13[0], VAR_14[0]); VAR_16 = mid_pred(VAR_12[1], VAR_13[1], VAR_14[1]); } else if (VAR_23) { if      (VAR_17) { VAR_15 = VAR_12[0]; VAR_16 = VAR_12[1]; } else if (VAR_18) { VAR_15 = VAR_13[0]; VAR_16 = VAR_13[1]; } else if (VAR_19) { VAR_15 = VAR_14[0]; VAR_16 = VAR_14[1]; } else av_assert2(0); } else VAR_15 = VAR_16 = 0; } } else { if (VAR_17)
VAR_20 = (VAR_12[1] & 4) ? 1 : 0; else
VAR_20 = 0; if (VAR_18)
VAR_21 = (VAR_13[1] & 4) ? 1 : 0; else
VAR_21 = 0; if (VAR_19)
VAR_22 = (VAR_14[1] & 4) ? 1 : 0; else
VAR_22 = 0; VAR_25  = VAR_20 + VAR_21 + VAR_22; VAR_24 = VAR_23 - VAR_25; if (VAR_23 == 3) { if ((VAR_24 == 3) || (VAR_25 == 3)) { VAR_15 = mid_pred(VAR_12[0], VAR_13[0], VAR_14[0]); VAR_16 = mid_pred(VAR_12[1], VAR_13[1], VAR_14[1]); } else if (VAR_24 >= VAR_25) { VAR_15 = !VAR_20 ? VAR_12[0] : VAR_13[0]; VAR_16 = !VAR_20 ? VAR_12[1] : VAR_13[1]; } else { VAR_15 =  VAR_20 ? VAR_12[0] : VAR_13[0]; VAR_16 =  VAR_20 ? VAR_12[1] : VAR_13[1]; } } else if (VAR_23 == 2) { if (VAR_24 >= VAR_25) { if (!VAR_20 && VAR_17) { VAR_15 = VAR_12[0]; VAR_16 = VAR_12[1]; } else if (!VAR_21 && VAR_18) { VAR_15 = VAR_13[0]; VAR_16 = VAR_13[1]; } else if (VAR_19) { VAR_15 = VAR_14[0]; VAR_16 = VAR_14[1]; } else VAR_15 = VAR_16 = 0; } else { if (VAR_20 && VAR_17) { VAR_15 = VAR_12[0]; VAR_16 = VAR_12[1]; } else if (VAR_21 && VAR_18) { VAR_15 = VAR_13[0]; VAR_16 = VAR_13[1]; } else if (VAR_19) { VAR_15 = VAR_14[0]; VAR_16 = VAR_14[1]; } else VAR_15 = VAR_16 = 0; } } else if (VAR_23 == 1) { VAR_15 = (VAR_17) ? VAR_12[0] : ((VAR_18) ? VAR_13[0] : VAR_14[0]); VAR_16 = (VAR_17) ? VAR_12[1] : ((VAR_18) ? VAR_13[1] : VAR_14[1]); } else VAR_15 = VAR_16 = 0; } s->mv[VAR_8][VAR_1][0] = s->current_picture.motion_val[VAR_8][VAR_9][0] = ((VAR_15 + VAR_2 + VAR_5) & ((VAR_5 << 1) - 1)) - VAR_5; s->mv[VAR_8][VAR_1][1] = s->current_picture.motion_val[VAR_8][VAR_9][1] = ((VAR_16 + VAR_3 + VAR_6) & ((VAR_6 << 1) - 1)) - VAR_6; if (VAR_4 == 1) { s->current_picture.motion_val[VAR_8][VAR_9 +    1    ][0] = s->current_picture.motion_val[VAR_8][VAR_9][0]; s->current_picture.motion_val[VAR_8][VAR_9 +    1    ][1] = s->current_picture.motion_val[VAR_8][VAR_9][1]; s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10    ][0] = s->current_picture.motion_val[VAR_8][VAR_9][0]; s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10    ][1] = s->current_picture.motion_val[VAR_8][VAR_9][1]; s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10 + 1][0] = s->current_picture.motion_val[VAR_8][VAR_9][0]; s->current_picture.motion_val[VAR_8][VAR_9 + VAR_10 + 1][1] = s->current_picture.motion_val[VAR_8][VAR_9][1]; } else if (VAR_4 == 2) { s->current_picture.motion_val[VAR_8][VAR_9 + 1][0] = s->current_picture.motion_val[VAR_8][VAR_9][0]; s->current_picture.motion_val[VAR_8][VAR_9 + 1][1] = s->current_picture.motion_val[VAR_8][VAR_9][1]; s->mv[VAR_8][VAR_1 + 1][0] = s->mv[VAR_8][VAR_1][0]; s->mv[VAR_8][VAR_1 + 1][1] = s->mv[VAR_8][VAR_1][1]; } }