Browse Source

Fix stupid bug in VP8 prefetching code

Originally committed as revision 24443 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Jason Garrett-Glaser 15 years ago
parent
commit
8cfae560ad
1 changed files with 7 additions and 9 deletions
  1. +7
    -9
      libavcodec/vp8.c

+ 7
- 9
libavcodec/vp8.c View File

@@ -1083,15 +1083,13 @@ static inline void vp8_mc_part(VP8Context *s, uint8_t *dst[3],
* Optimized for 64-byte cache lines. Inspired by ffh264 prefetch_motion. */
static inline void prefetch_motion(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, int x_off, int y_off, int ref)
{
if (mb->ref_frame != VP56_FRAME_CURRENT) {
int mx = mb->mv.x + x_off + 8;
int my = mb->mv.y + y_off;
uint8_t **src= s->framep[mb->ref_frame]->data;
int off= mx + (my + (mb_x&3)*4)*s->linesize + 64;
s->dsp.prefetch(src[0]+off, s->linesize, 4);
off= (mx>>1) + ((my>>1) + (mb_x&7))*s->uvlinesize + 64;
s->dsp.prefetch(src[1]+off, src[2]-src[1], 2);
}
int mx = mb->mv.x + x_off + 8;
int my = mb->mv.y + y_off;
uint8_t **src= s->framep[ref]->data;
int off= mx + (my + (mb_x&3)*4)*s->linesize + 64;
s->dsp.prefetch(src[0]+off, s->linesize, 4);
off= (mx>>1) + ((my>>1) + (mb_x&7))*s->uvlinesize + 64;
s->dsp.prefetch(src[1]+off, src[2]-src[1], 2);
}

/**


Loading…
Cancel
Save