pix_op[dxy](dest, ptr, s->linesize, 8);
pix_op[1][dxy](dest, ptr, s->linesize, 8);
static inline void MPV_motion(MpegEncContext *s,                               UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr,                              int dir, UINT8 **ref_picture,                               op_pixels_func *pix_op, qpel_mc_func *qpix_op){    int dxy, offset, mx, my, src_x, src_y, motion_x, motion_y;    int mb_x, mb_y, i;    UINT8 *ptr, *dest;    int emu=0;    mb_x = s->mb_x;    mb_y = s->mb_y;    switch(s->mv_type) {    case MV_TYPE_16X16:        if(s->mcsel){#if 0            mpeg_motion(s, dest_y, dest_cb, dest_cr, 0,                        ref_picture, 0,                        0, pix_op,                        s->sprite_offset[0][0]>>3,                        s->sprite_offset[0][1]>>3,                        16);#else            gmc1_motion(s, dest_y, dest_cb, dest_cr, 0,                        ref_picture, 0,                        16);#endif        }else if(s->quarter_sample && dir==0){ //FIXME            qpel_motion(s, dest_y, dest_cb, dest_cr, 0,                        ref_picture, 0,                        0, pix_op, qpix_op,                        s->mv[dir][0][0], s->mv[dir][0][1], 16);        }else{            mpeg_motion(s, dest_y, dest_cb, dest_cr, 0,                        ref_picture, 0,                        0, pix_op,                        s->mv[dir][0][0], s->mv[dir][0][1], 16);        }                   break;    case MV_TYPE_8X8:        for(i=0;i<4;i++) {            motion_x = s->mv[dir][i][0];            motion_y = s->mv[dir][i][1];            dxy = ((motion_y & 1) << 1) | (motion_x & 1);            src_x = mb_x * 16 + (motion_x >> 1) + (i & 1) * 8;            src_y = mb_y * 16 + (motion_y >> 1) + (i >>1) * 8;                                /* WARNING: do no forget half pels */            src_x = clip(src_x, -16, s->width);            if (src_x == s->width)                dxy &= ~1;            src_y = clip(src_y, -16, s->height);            if (src_y == s->height)                dxy &= ~2;                                ptr = ref_picture[0] + (src_y * s->linesize) + (src_x);            if(s->flags&CODEC_FLAG_EMU_EDGE){                if(src_x<0 || src_y<0 || src_x + (motion_x&1) + 8 > s->h_edge_pos                                      || src_y + (motion_y&1) + 8 > s->v_edge_pos){                    emulated_edge_mc(s, ptr, s->linesize, 9, 9, src_x, src_y, s->h_edge_pos, s->v_edge_pos);                    ptr= s->edge_emu_buffer;                }            }            dest = dest_y + ((i & 1) * 8) + (i >> 1) * 8 * s->linesize;            pix_op[dxy](dest, ptr, s->linesize, 8);        }            if(s->flags&CODEC_FLAG_GRAY) break;        /* In case of 8X8, we construct a single chroma motion vector           with a special rounding */        mx = 0;        my = 0;        for(i=0;i<4;i++) {            mx += s->mv[dir][i][0];            my += s->mv[dir][i][1];        }        if (mx >= 0)            mx = (h263_chroma_roundtab[mx & 0xf] + ((mx >> 3) & ~1));        else {            mx = -mx;            mx = -(h263_chroma_roundtab[mx & 0xf] + ((mx >> 3) & ~1));        }        if (my >= 0)            my = (h263_chroma_roundtab[my & 0xf] + ((my >> 3) & ~1));        else {            my = -my;            my = -(h263_chroma_roundtab[my & 0xf] + ((my >> 3) & ~1));        }        dxy = ((my & 1) << 1) | (mx & 1);        mx >>= 1;        my >>= 1;        src_x = mb_x * 8 + mx;        src_y = mb_y * 8 + my;        src_x = clip(src_x, -8, s->width/2);        if (src_x == s->width/2)            dxy &= ~1;        src_y = clip(src_y, -8, s->height/2);        if (src_y == s->height/2)            dxy &= ~2;                offset = (src_y * (s->uvlinesize)) + src_x;        ptr = ref_picture[1] + offset;        if(s->flags&CODEC_FLAG_EMU_EDGE){                if(src_x<0 || src_y<0 || src_x + (dxy &1) + 8 > s->h_edge_pos>>1                                      || src_y + (dxy>>1) + 8 > s->v_edge_pos>>1){                    emulated_edge_mc(s, ptr, s->uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);                    ptr= s->edge_emu_buffer;                    emu=1;                }            }        pix_op[dxy](dest_cb, ptr, s->uvlinesize, 8);        ptr = ref_picture[2] + offset;        if(emu){            emulated_edge_mc(s, ptr, s->uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1);            ptr= s->edge_emu_buffer;        }        pix_op[dxy](dest_cr, ptr, s->uvlinesize, 8);        break;    case MV_TYPE_FIELD:        if (s->picture_structure == PICT_FRAME) {            /* top field */            mpeg_motion(s, dest_y, dest_cb, dest_cr, 0,                        ref_picture, s->field_select[dir][0] ? s->linesize : 0,                        1, pix_op,                        s->mv[dir][0][0], s->mv[dir][0][1], 8);            /* bottom field */            mpeg_motion(s, dest_y, dest_cb, dest_cr, s->linesize,                        ref_picture, s->field_select[dir][1] ? s->linesize : 0,                        1, pix_op,                        s->mv[dir][1][0], s->mv[dir][1][1], 8);        } else {                    }        break;    }}