xy = 2 * s->mb_y + 1 + ((n & 2) >> 1);
xy = 2 * s->mb_y + 1 + (n >> 1);
static int mpeg4_pred_dc(MpegEncContext * s, int n, UINT16 **dc_val_ptr, int *dir_ptr){    int a, b, c, xy, wrap, pred, scale;    UINT16 *dc_val;    /* find prediction */    if (n < 4) {	wrap = s->mb_width * 2 + 2;	xy = 2 * s->mb_y + 1 + ((n & 2) >> 1);        xy *= wrap;	xy += 2 * s->mb_x + 1 + (n & 1);	dc_val = s->dc_val[0];	scale = s->y_dc_scale;    } else {	wrap = s->mb_width + 2;	xy = s->mb_y + 1;	xy *= wrap;	xy += s->mb_x + 1;	dc_val = s->dc_val[n - 4 + 1];	scale = s->c_dc_scale;    }    /* B C     * A X      */    a = dc_val[xy - 1];    b = dc_val[xy - 1 - wrap];    c = dc_val[xy - wrap];    if (abs(a - b) < abs(b - c)) {	pred = c;        *dir_ptr = 1; /* top */    } else {	pred = a;        *dir_ptr = 0; /* left */    }    /* we assume pred is positive */    pred = (pred + (scale >> 1)) / scale;    /* prepare address for prediction update */    *dc_val_ptr = &dc_val[xy];    return pred;}