Mercurial > libavcodec.hg
changeset 12230:00a4a6b56c7f libavcodec
Fix stupid bug in VP8 prefetching code
author | darkshikari |
---|---|
date | Thu, 22 Jul 2010 22:15:43 +0000 |
parents | cf675a4d5195 |
children | d3f3897ddb5c |
files | vp8.c |
diffstat | 1 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/vp8.c Thu Jul 22 22:08:09 2010 +0000 +++ b/vp8.c Thu Jul 22 22:15:43 2010 +0000 @@ -1083,15 +1083,13 @@ * 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); } /**