libavcodec/vc1dec.c:1609: error: Uninitialized Value
  The value read from oppfield_predA[_] was never initialized.

libavcodec/vc1dec.c:1609:9: 
1607.         samefield_pred[0] = samefield_predA[0];
1608.         samefield_pred[1] = samefield_predA[1];
1609.         oppfield_pred[0]  = oppfield_predA[0];
              ^
1610.         oppfield_pred[1]  = oppfield_predA[1];
1611.     } else if (c_valid) {

static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
                               int mv1, int r_x, int r_y, uint8_t* is_intra,
                               int pred_flag, int dir)
{
    MpegEncContext *s = &v->s;
    int xy, wrap, off = 0;
    int16_t *A, *B, *C;
    int px, py;
    int sum;
    int mixedmv_pic, num_samefield = 0, num_oppfield = 0;
    int opposit, f;
    int16_t samefield_pred[2],  oppfield_pred[2];
    int16_t samefield_predA[2], oppfield_predA[2];
    int16_t samefield_predB[2], oppfield_predB[2];
    int16_t samefield_predC[2], oppfield_predC[2];
    int16_t *predA, *predC;
    int a_valid, b_valid, c_valid;
    int hybridmv_thresh, y_bias = 0;
    if (v->mv_mode == MV_PMODE_MIXED_MV ||
        ((v->mv_mode == MV_PMODE_INTENSITY_COMP) && (v->mv_mode2 == MV_PMODE_MIXED_MV)))
        mixedmv_pic = 1;
    else
        mixedmv_pic = 0;
    dmv_x <<= 1 - s->quarter_sample;
    dmv_y <<= 1 - s->quarter_sample;
    wrap = s->b8_stride;
    xy   = s->block_index[n];
    if (s->mb_intra) {
        s->mv[0][n][0] = s->current_picture.f.motion_val[0][xy + v->blocks_off][0] = 0;
        s->mv[0][n][1] = s->current_picture.f.motion_val[0][xy + v->blocks_off][1] = 0;
        s->current_picture.f.motion_val[1][xy + v->blocks_off][0] = 0;
        s->current_picture.f.motion_val[1][xy + v->blocks_off][1] = 0;
        if (mv1) {
            s->current_picture.f.motion_val[0][xy + 1 + v->blocks_off][0]        = 0;
            s->current_picture.f.motion_val[0][xy + 1 + v->blocks_off][1]        = 0;
            s->current_picture.f.motion_val[0][xy + wrap + v->blocks_off][0]     = 0;
            s->current_picture.f.motion_val[0][xy + wrap + v->blocks_off][1]     = 0;
            s->current_picture.f.motion_val[0][xy + wrap + 1 + v->blocks_off][0] = 0;
            s->current_picture.f.motion_val[0][xy + wrap + 1 + v->blocks_off][1] = 0;
            v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;
            s->current_picture.f.motion_val[1][xy + 1 + v->blocks_off][0]        = 0;
            s->current_picture.f.motion_val[1][xy + 1 + v->blocks_off][1]        = 0;
            s->current_picture.f.motion_val[1][xy + wrap][0]                     = 0;
            s->current_picture.f.motion_val[1][xy + wrap + v->blocks_off][1]     = 0;
            s->current_picture.f.motion_val[1][xy + wrap + 1 + v->blocks_off][0] = 0;
            s->current_picture.f.motion_val[1][xy + wrap + 1 + v->blocks_off][1] = 0;
        }
        return;
    }
    C = s->current_picture.f.motion_val[dir][xy -    1 + v->blocks_off];
    A = s->current_picture.f.motion_val[dir][xy - wrap + v->blocks_off];
    if (mv1) {
        if (v->field_mode && mixedmv_pic)
            off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;
        else
            off = (s->mb_x == (s->mb_width - 1)) ? -1 : 2;
    } else {
        switch (n) {
        case 0:
            off = (s->mb_x > 0) ? -1 : 1;
            break;
        case 1:
            off = (s->mb_x == (s->mb_width - 1)) ? -1 : 1;
            break;
        case 2:
            off = 1;
            break;
        case 3:
            off = -1;
        }
    }
    B = s->current_picture.f.motion_val[dir][xy - wrap + off + v->blocks_off];
    a_valid = !s->first_slice_line || (n == 2 || n == 3);
    b_valid = a_valid && (s->mb_width > 1);
    c_valid = s->mb_x || (n == 1 || n == 3);
    if (v->field_mode) {
        a_valid = a_valid && !is_intra[xy - wrap];
        b_valid = b_valid && !is_intra[xy - wrap + off];
        c_valid = c_valid && !is_intra[xy - 1];
    }
    if (a_valid) {
        f = v->mv_f[dir][xy - wrap + v->blocks_off];
        num_oppfield  += f;
        num_samefield += 1 - f;
        if (f) {
            oppfield_predA[0]  = A[0];
            oppfield_predA[1]  = A[1];
            samefield_predA[0] = scaleforsame(v, 0, A[0], 0, dir);
            samefield_predA[1] = scaleforsame(v, n, A[1], 1, dir);
        } else {
            samefield_predA[0] = A[0];
            samefield_predA[1] = A[1];
            if (v->numref)
                oppfield_predA[0] = scaleforopp(v, A[0], 0, dir);
            if (v->numref)
                oppfield_predA[1] = scaleforopp(v, A[1], 1, dir);
        }
    } else {
        samefield_predA[0] = samefield_predA[1] = 0;
        oppfield_predA[0]  = oppfield_predA[1]  = 0;
    }
    if (c_valid) {
        f = v->mv_f[dir][xy - 1 + v->blocks_off];
        num_oppfield  += f;
        num_samefield += 1 - f;
        if (f) {
            oppfield_predC[0]  = C[0];
            oppfield_predC[1]  = C[1];
            samefield_predC[0] = scaleforsame(v, 0, C[0], 0, dir);
            samefield_predC[1] = scaleforsame(v, n, C[1], 1, dir);
        } else {
            samefield_predC[0] = C[0];
            samefield_predC[1] = C[1];
            if (v->numref)
                oppfield_predC[0] = scaleforopp(v, C[0], 0, dir);
            if (v->numref)
                oppfield_predC[1] = scaleforopp(v, C[1], 1, dir);
        }
    } else {
        samefield_predC[0] = samefield_predC[1] = 0;
        oppfield_predC[0]  = oppfield_predC[1]  = 0;
    }
    if (b_valid) {
        f = v->mv_f[dir][xy - wrap + off + v->blocks_off];
        num_oppfield  += f;
        num_samefield += 1 - f;
        if (f) {
            oppfield_predB[0]  = B[0];
            oppfield_predB[1]  = B[1];
            samefield_predB[0] = scaleforsame(v, 0, B[0], 0, dir);
            samefield_predB[1] = scaleforsame(v, n, B[1], 1, dir);
        } else {
            samefield_predB[0] = B[0];
            samefield_predB[1] = B[1];
            if (v->numref)
                oppfield_predB[0] = scaleforopp(v, B[0], 0, dir);
            if (v->numref)
                oppfield_predB[1] = scaleforopp(v, B[1], 1, dir);
        }
    } else {
        samefield_predB[0] = samefield_predB[1] = 0;
        oppfield_predB[0]  = oppfield_predB[1]  = 0;
    }
    if (a_valid) {
        samefield_pred[0] = samefield_predA[0];
        samefield_pred[1] = samefield_predA[1];
        oppfield_pred[0]  = oppfield_predA[0];
        oppfield_pred[1]  = oppfield_predA[1];
    } else if (c_valid) {
        samefield_pred[0] = samefield_predC[0];
        samefield_pred[1] = samefield_predC[1];
        oppfield_pred[0]  = oppfield_predC[0];
        oppfield_pred[1]  = oppfield_predC[1];
    } else if (b_valid) {
        samefield_pred[0] = samefield_predB[0];
        samefield_pred[1] = samefield_predB[1];
        oppfield_pred[0]  = oppfield_predB[0];
        oppfield_pred[1]  = oppfield_predB[1];
    } else {
        samefield_pred[0] = samefield_pred[1] = 0;
        oppfield_pred[0]  = oppfield_pred[1]  = 0;
    }
    if (num_samefield + num_oppfield > 1) {
        samefield_pred[0] = mid_pred(samefield_predA[0], samefield_predB[0], samefield_predC[0]);
        samefield_pred[1] = mid_pred(samefield_predA[1], samefield_predB[1], samefield_predC[1]);
        if (v->numref)
            oppfield_pred[0] = mid_pred(oppfield_predA[0], oppfield_predB[0], oppfield_predC[0]);
        if (v->numref)
            oppfield_pred[1] = mid_pred(oppfield_predA[1], oppfield_predB[1], oppfield_predC[1]);
    }
    if (v->field_mode) {
        if (num_samefield <= num_oppfield)
            opposit = 1 - pred_flag;
        else
            opposit = pred_flag;
    } else
        opposit = 0;
    if (opposit) {
        px    = oppfield_pred[0];
        py    = oppfield_pred[1];
        predA = oppfield_predA;
        predC = oppfield_predC;
        v->mv_f[dir][xy + v->blocks_off] = f = 1;
        v->ref_field_type[dir] = !v->cur_field_type;
    } else {
        px    = samefield_pred[0];
        py    = samefield_pred[1];
        predA = samefield_predA;
        predC = samefield_predC;
        v->mv_f[dir][xy + v->blocks_off] = f = 0;
        v->ref_field_type[dir] = v->cur_field_type;
    }
    if (!v->field_mode) {
        int qx, qy, X, Y;
        qx = (s->mb_x << 6) + ((n == 1 || n == 3) ? 32 : 0);
        qy = (s->mb_y << 6) + ((n == 2 || n == 3) ? 32 : 0);
        X  = (s->mb_width  << 6) - 4;
        Y  = (s->mb_height << 6) - 4;
        if (mv1) {
            if (qx + px < -60) px = -60 - qx;
            if (qy + py < -60) py = -60 - qy;
        } else {
            if (qx + px < -28) px = -28 - qx;
            if (qy + py < -28) py = -28 - qy;
        }
        if (qx + px > X) px = X - qx;
        if (qy + py > Y) py = Y - qy;
    }
    if (!v->field_mode || s->pict_type != AV_PICTURE_TYPE_B) {
        if (v->field_mode && !s->quarter_sample)
            hybridmv_thresh = 16;
        else
            hybridmv_thresh = 32;
        if (a_valid && c_valid) {
            if (is_intra[xy - wrap])
                sum = FFABS(px) + FFABS(py);
            else
                sum = FFABS(px - predA[0]) + FFABS(py - predA[1]);
            if (sum > hybridmv_thresh) {
                if (get_bits1(&s->gb)) {
                    px = predA[0];
                    py = predA[1];
                } else {
                    px = predC[0];
                    py = predC[1];
                }
            } else {
                if (is_intra[xy - 1])
                    sum = FFABS(px) + FFABS(py);
                else
                    sum = FFABS(px - predC[0]) + FFABS(py - predC[1]);
                if (sum > hybridmv_thresh) {
                    if (get_bits1(&s->gb)) {
                        px = predA[0];
                        py = predA[1];
                    } else {
                        px = predC[0];
                        py = predC[1];
                    }
                }
            }
        }
    }
    if (v->field_mode && !s->quarter_sample) {
        r_x <<= 1;
        r_y <<= 1;
    }
    if (v->field_mode && v->numref)
        r_y >>= 1;
    if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)
        y_bias = 1;
    s->mv[dir][n][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;
    s->mv[dir][n][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1] = ((py + dmv_y + r_y - y_bias) & ((r_y << 1) - 1)) - r_y + y_bias;
    if (mv1) {
        s->current_picture.f.motion_val[dir][xy +    1 +     v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0];
        s->current_picture.f.motion_val[dir][xy +    1 +     v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1];
        s->current_picture.f.motion_val[dir][xy + wrap +     v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0];
        s->current_picture.f.motion_val[dir][xy + wrap +     v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1];
        s->current_picture.f.motion_val[dir][xy + wrap + 1 + v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0];
        s->current_picture.f.motion_val[dir][xy + wrap + 1 + v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1];
        v->mv_f[dir][xy +    1 + v->blocks_off] = v->mv_f[dir][xy +            v->blocks_off];
        v->mv_f[dir][xy + wrap + v->blocks_off] = v->mv_f[dir][xy + wrap + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off];
    }
}
['static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,\n                               int mv1, int r_x, int r_y, uint8_t* is_intra,\n                               int pred_flag, int dir)\n{\n    MpegEncContext *s = &v->s;\n    int xy, wrap, off = 0;\n    int16_t *A, *B, *C;\n    int px, py;\n    int sum;\n    int mixedmv_pic, num_samefield = 0, num_oppfield = 0;\n    int opposit, f;\n    int16_t samefield_pred[2],  oppfield_pred[2];\n    int16_t samefield_predA[2], oppfield_predA[2];\n    int16_t samefield_predB[2], oppfield_predB[2];\n    int16_t samefield_predC[2], oppfield_predC[2];\n    int16_t *predA, *predC;\n    int a_valid, b_valid, c_valid;\n    int hybridmv_thresh, y_bias = 0;\n    if (v->mv_mode == MV_PMODE_MIXED_MV ||\n        ((v->mv_mode == MV_PMODE_INTENSITY_COMP) && (v->mv_mode2 == MV_PMODE_MIXED_MV)))\n        mixedmv_pic = 1;\n    else\n        mixedmv_pic = 0;\n    dmv_x <<= 1 - s->quarter_sample;\n    dmv_y <<= 1 - s->quarter_sample;\n    wrap = s->b8_stride;\n    xy   = s->block_index[n];\n    if (s->mb_intra) {\n        s->mv[0][n][0] = s->current_picture.f.motion_val[0][xy + v->blocks_off][0] = 0;\n        s->mv[0][n][1] = s->current_picture.f.motion_val[0][xy + v->blocks_off][1] = 0;\n        s->current_picture.f.motion_val[1][xy + v->blocks_off][0] = 0;\n        s->current_picture.f.motion_val[1][xy + v->blocks_off][1] = 0;\n        if (mv1) {\n            s->current_picture.f.motion_val[0][xy + 1 + v->blocks_off][0]        = 0;\n            s->current_picture.f.motion_val[0][xy + 1 + v->blocks_off][1]        = 0;\n            s->current_picture.f.motion_val[0][xy + wrap + v->blocks_off][0]     = 0;\n            s->current_picture.f.motion_val[0][xy + wrap + v->blocks_off][1]     = 0;\n            s->current_picture.f.motion_val[0][xy + wrap + 1 + v->blocks_off][0] = 0;\n            s->current_picture.f.motion_val[0][xy + wrap + 1 + v->blocks_off][1] = 0;\n            v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0;\n            s->current_picture.f.motion_val[1][xy + 1 + v->blocks_off][0]        = 0;\n            s->current_picture.f.motion_val[1][xy + 1 + v->blocks_off][1]        = 0;\n            s->current_picture.f.motion_val[1][xy + wrap][0]                     = 0;\n            s->current_picture.f.motion_val[1][xy + wrap + v->blocks_off][1]     = 0;\n            s->current_picture.f.motion_val[1][xy + wrap + 1 + v->blocks_off][0] = 0;\n            s->current_picture.f.motion_val[1][xy + wrap + 1 + v->blocks_off][1] = 0;\n        }\n        return;\n    }\n    C = s->current_picture.f.motion_val[dir][xy -    1 + v->blocks_off];\n    A = s->current_picture.f.motion_val[dir][xy - wrap + v->blocks_off];\n    if (mv1) {\n        if (v->field_mode && mixedmv_pic)\n            off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;\n        else\n            off = (s->mb_x == (s->mb_width - 1)) ? -1 : 2;\n    } else {\n        switch (n) {\n        case 0:\n            off = (s->mb_x > 0) ? -1 : 1;\n            break;\n        case 1:\n            off = (s->mb_x == (s->mb_width - 1)) ? -1 : 1;\n            break;\n        case 2:\n            off = 1;\n            break;\n        case 3:\n            off = -1;\n        }\n    }\n    B = s->current_picture.f.motion_val[dir][xy - wrap + off + v->blocks_off];\n    a_valid = !s->first_slice_line || (n == 2 || n == 3);\n    b_valid = a_valid && (s->mb_width > 1);\n    c_valid = s->mb_x || (n == 1 || n == 3);\n    if (v->field_mode) {\n        a_valid = a_valid && !is_intra[xy - wrap];\n        b_valid = b_valid && !is_intra[xy - wrap + off];\n        c_valid = c_valid && !is_intra[xy - 1];\n    }\n    if (a_valid) {\n        f = v->mv_f[dir][xy - wrap + v->blocks_off];\n        num_oppfield  += f;\n        num_samefield += 1 - f;\n        if (f) {\n            oppfield_predA[0]  = A[0];\n            oppfield_predA[1]  = A[1];\n            samefield_predA[0] = scaleforsame(v, 0, A[0], 0, dir);\n            samefield_predA[1] = scaleforsame(v, n, A[1], 1, dir);\n        } else {\n            samefield_predA[0] = A[0];\n            samefield_predA[1] = A[1];\n            if (v->numref)\n                oppfield_predA[0] = scaleforopp(v, A[0], 0, dir);\n            if (v->numref)\n                oppfield_predA[1] = scaleforopp(v, A[1], 1, dir);\n        }\n    } else {\n        samefield_predA[0] = samefield_predA[1] = 0;\n        oppfield_predA[0]  = oppfield_predA[1]  = 0;\n    }\n    if (c_valid) {\n        f = v->mv_f[dir][xy - 1 + v->blocks_off];\n        num_oppfield  += f;\n        num_samefield += 1 - f;\n        if (f) {\n            oppfield_predC[0]  = C[0];\n            oppfield_predC[1]  = C[1];\n            samefield_predC[0] = scaleforsame(v, 0, C[0], 0, dir);\n            samefield_predC[1] = scaleforsame(v, n, C[1], 1, dir);\n        } else {\n            samefield_predC[0] = C[0];\n            samefield_predC[1] = C[1];\n            if (v->numref)\n                oppfield_predC[0] = scaleforopp(v, C[0], 0, dir);\n            if (v->numref)\n                oppfield_predC[1] = scaleforopp(v, C[1], 1, dir);\n        }\n    } else {\n        samefield_predC[0] = samefield_predC[1] = 0;\n        oppfield_predC[0]  = oppfield_predC[1]  = 0;\n    }\n    if (b_valid) {\n        f = v->mv_f[dir][xy - wrap + off + v->blocks_off];\n        num_oppfield  += f;\n        num_samefield += 1 - f;\n        if (f) {\n            oppfield_predB[0]  = B[0];\n            oppfield_predB[1]  = B[1];\n            samefield_predB[0] = scaleforsame(v, 0, B[0], 0, dir);\n            samefield_predB[1] = scaleforsame(v, n, B[1], 1, dir);\n        } else {\n            samefield_predB[0] = B[0];\n            samefield_predB[1] = B[1];\n            if (v->numref)\n                oppfield_predB[0] = scaleforopp(v, B[0], 0, dir);\n            if (v->numref)\n                oppfield_predB[1] = scaleforopp(v, B[1], 1, dir);\n        }\n    } else {\n        samefield_predB[0] = samefield_predB[1] = 0;\n        oppfield_predB[0]  = oppfield_predB[1]  = 0;\n    }\n    if (a_valid) {\n        samefield_pred[0] = samefield_predA[0];\n        samefield_pred[1] = samefield_predA[1];\n        oppfield_pred[0]  = oppfield_predA[0];\n        oppfield_pred[1]  = oppfield_predA[1];\n    } else if (c_valid) {\n        samefield_pred[0] = samefield_predC[0];\n        samefield_pred[1] = samefield_predC[1];\n        oppfield_pred[0]  = oppfield_predC[0];\n        oppfield_pred[1]  = oppfield_predC[1];\n    } else if (b_valid) {\n        samefield_pred[0] = samefield_predB[0];\n        samefield_pred[1] = samefield_predB[1];\n        oppfield_pred[0]  = oppfield_predB[0];\n        oppfield_pred[1]  = oppfield_predB[1];\n    } else {\n        samefield_pred[0] = samefield_pred[1] = 0;\n        oppfield_pred[0]  = oppfield_pred[1]  = 0;\n    }\n    if (num_samefield + num_oppfield > 1) {\n        samefield_pred[0] = mid_pred(samefield_predA[0], samefield_predB[0], samefield_predC[0]);\n        samefield_pred[1] = mid_pred(samefield_predA[1], samefield_predB[1], samefield_predC[1]);\n        if (v->numref)\n            oppfield_pred[0] = mid_pred(oppfield_predA[0], oppfield_predB[0], oppfield_predC[0]);\n        if (v->numref)\n            oppfield_pred[1] = mid_pred(oppfield_predA[1], oppfield_predB[1], oppfield_predC[1]);\n    }\n    if (v->field_mode) {\n        if (num_samefield <= num_oppfield)\n            opposit = 1 - pred_flag;\n        else\n            opposit = pred_flag;\n    } else\n        opposit = 0;\n    if (opposit) {\n        px    = oppfield_pred[0];\n        py    = oppfield_pred[1];\n        predA = oppfield_predA;\n        predC = oppfield_predC;\n        v->mv_f[dir][xy + v->blocks_off] = f = 1;\n        v->ref_field_type[dir] = !v->cur_field_type;\n    } else {\n        px    = samefield_pred[0];\n        py    = samefield_pred[1];\n        predA = samefield_predA;\n        predC = samefield_predC;\n        v->mv_f[dir][xy + v->blocks_off] = f = 0;\n        v->ref_field_type[dir] = v->cur_field_type;\n    }\n    if (!v->field_mode) {\n        int qx, qy, X, Y;\n        qx = (s->mb_x << 6) + ((n == 1 || n == 3) ? 32 : 0);\n        qy = (s->mb_y << 6) + ((n == 2 || n == 3) ? 32 : 0);\n        X  = (s->mb_width  << 6) - 4;\n        Y  = (s->mb_height << 6) - 4;\n        if (mv1) {\n            if (qx + px < -60) px = -60 - qx;\n            if (qy + py < -60) py = -60 - qy;\n        } else {\n            if (qx + px < -28) px = -28 - qx;\n            if (qy + py < -28) py = -28 - qy;\n        }\n        if (qx + px > X) px = X - qx;\n        if (qy + py > Y) py = Y - qy;\n    }\n    if (!v->field_mode || s->pict_type != AV_PICTURE_TYPE_B) {\n        if (v->field_mode && !s->quarter_sample)\n            hybridmv_thresh = 16;\n        else\n            hybridmv_thresh = 32;\n        if (a_valid && c_valid) {\n            if (is_intra[xy - wrap])\n                sum = FFABS(px) + FFABS(py);\n            else\n                sum = FFABS(px - predA[0]) + FFABS(py - predA[1]);\n            if (sum > hybridmv_thresh) {\n                if (get_bits1(&s->gb)) {\n                    px = predA[0];\n                    py = predA[1];\n                } else {\n                    px = predC[0];\n                    py = predC[1];\n                }\n            } else {\n                if (is_intra[xy - 1])\n                    sum = FFABS(px) + FFABS(py);\n                else\n                    sum = FFABS(px - predC[0]) + FFABS(py - predC[1]);\n                if (sum > hybridmv_thresh) {\n                    if (get_bits1(&s->gb)) {\n                        px = predA[0];\n                        py = predA[1];\n                    } else {\n                        px = predC[0];\n                        py = predC[1];\n                    }\n                }\n            }\n        }\n    }\n    if (v->field_mode && !s->quarter_sample) {\n        r_x <<= 1;\n        r_y <<= 1;\n    }\n    if (v->field_mode && v->numref)\n        r_y >>= 1;\n    if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)\n        y_bias = 1;\n    s->mv[dir][n][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;\n    s->mv[dir][n][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1] = ((py + dmv_y + r_y - y_bias) & ((r_y << 1) - 1)) - r_y + y_bias;\n    if (mv1) {\n        s->current_picture.f.motion_val[dir][xy +    1 +     v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0];\n        s->current_picture.f.motion_val[dir][xy +    1 +     v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1];\n        s->current_picture.f.motion_val[dir][xy + wrap +     v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0];\n        s->current_picture.f.motion_val[dir][xy + wrap +     v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1];\n        s->current_picture.f.motion_val[dir][xy + wrap + 1 + v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0];\n        s->current_picture.f.motion_val[dir][xy + wrap + 1 + v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1];\n        v->mv_f[dir][xy +    1 + v->blocks_off] = v->mv_f[dir][xy +            v->blocks_off];\n        v->mv_f[dir][xy + wrap + v->blocks_off] = v->mv_f[dir][xy + wrap + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off];\n    }\n}']