diff options
author | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-07-22 22:15:43 +0000 |
---|---|---|
committer | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-07-22 22:15:43 +0000 |
commit | 8cfae560ad6e6eafdcb085e6ca3457e66877a9f3 (patch) | |
tree | 2face1098ff39a3c3173cbb084804d23f86add90 /libavcodec/vp8.c | |
parent | c257c7529d9f406cc3ad29d67000d379210c52cd (diff) | |
download | ffmpeg-8cfae560ad6e6eafdcb085e6ca3457e66877a9f3.tar.gz |
Fix stupid bug in VP8 prefetching code
Originally committed as revision 24443 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 947d7c08ca..c20214087a 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -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); } /** |