Revision 8cfae560 libavcodec/vp8.c

View differences:

libavcodec/vp8.c
1083 1083
 * Optimized for 64-byte cache lines.  Inspired by ffh264 prefetch_motion. */
1084 1084
static inline void prefetch_motion(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, int x_off, int y_off, int ref)
1085 1085
{
1086
    if (mb->ref_frame != VP56_FRAME_CURRENT) {
1087
        int mx = mb->mv.x + x_off + 8;
1088
        int my = mb->mv.y + y_off;
1089
        uint8_t **src= s->framep[mb->ref_frame]->data;
1090
        int off= mx + (my + (mb_x&3)*4)*s->linesize + 64;
1091
        s->dsp.prefetch(src[0]+off, s->linesize, 4);
1092
        off= (mx>>1) + ((my>>1) + (mb_x&7))*s->uvlinesize + 64;
1093
        s->dsp.prefetch(src[1]+off, src[2]-src[1], 2);
1094
    }
1086
    int mx = mb->mv.x + x_off + 8;
1087
    int my = mb->mv.y + y_off;
1088
    uint8_t **src= s->framep[ref]->data;
1089
    int off= mx + (my + (mb_x&3)*4)*s->linesize + 64;
1090
    s->dsp.prefetch(src[0]+off, s->linesize, 4);
1091
    off= (mx>>1) + ((my>>1) + (mb_x&7))*s->uvlinesize + 64;
1092
    s->dsp.prefetch(src[1]+off, src[2]-src[1], 2);
1095 1093
}
1096 1094

  
1097 1095
/**

Also available in: Unified diff