xy = s->mb_x + s->mb_y * wrap;
xy = 2*(s->mb_x + s->mb_y * wrap);
int16_t *h263_pred_motion2(MpegEncContext * s, int block, int dir,                        int *px, int *py){    int xy, wrap;    int16_t *A, *B, *C, (*mot_val)[2];    static const int off[4]= {2, 1, 1, -1};    wrap = s->b8_stride;    xy = s->mb_x + s->mb_y * wrap;    mot_val = s->current_picture.motion_val[0][dir] + xy;    A = mot_val[ - 1];    /* special case for first (slice) line */    if (s->first_slice_line && block<3) {        // we cant just change some MVs to simulate that as we need them for the B frames (and ME)        // and if we ever support non rectangular objects than we need to do a few ifs here anyway :(        if(block==0){ //most common case            if(s->mb_x  == s->resync_mb_x){ //rare                *px= *py = 0;            }else if(s->mb_x + 1 == s->resync_mb_x && s->h263_pred){ //rare                C = mot_val[off[block] - wrap];                if(s->mb_x==0){                    *px = C[0];                    *py = C[1];                }else{                    *px = mid_pred(A[0], 0, C[0]);                    *py = mid_pred(A[1], 0, C[1]);                }            }else{                *px = A[0];                *py = A[1];            }        }else if(block==1){            if(s->mb_x + 1 == s->resync_mb_x && s->h263_pred){ //rare                C = mot_val[off[block] - wrap];                *px = mid_pred(A[0], 0, C[0]);                *py = mid_pred(A[1], 0, C[1]);            }else{                *px = A[0];                *py = A[1];            }        }else{ /* block==2*/            B = mot_val[ - wrap];            C = mot_val[off[block] - wrap];            if(s->mb_x == s->resync_mb_x) //rare                A[0]=A[1]=0;                *px = mid_pred(A[0], B[0], C[0]);            *py = mid_pred(A[1], B[1], C[1]);        }    } else {        B = mot_val[ - wrap];        C = mot_val[off[block] - wrap];        *px = mid_pred(A[0], B[0], C[0]);        *py = mid_pred(A[1], B[1], C[1]);    }    return *mot_val;}