static inline void prefetch_motion(MpegEncContext *s, uint8_t **pix, int dir){
    /* fetch pixels for estimated mv 4 macroblocks ahead
     * optimized for 64byte cache lines */
    const int shift = s->quarter_sample ? 2 : 1;
    const int mx= (s->mv[dir][0][0]>>shift) + 16*s->mb_x + 8;
    const int my= (s->mv[dir][0][1]>>shift) + 16*s->mb_y;
    int off= mx + (my + (s->mb_x&3)*4)*s->linesize + 64;
    s->vdsp.prefetch(pix[0]+off, s->linesize, 4);
    off= (mx>>1) + ((my>>1) + (s->mb_x&7))*s->uvlinesize + 64;
    s->vdsp.prefetch(pix[1]+off, pix[2]-pix[1], 2);
}