# HG changeset patch # User kostya # Date 1237105302 0 # Node ID 5de43b1eb9f45168cb5182785fdf232f9f88ca27 # Parent fd8b4aa6e493e93618cb1c846e457b608a71e7f3 Correct MV prediction for B-frame blocks in RV4 decoder diff -r fd8b4aa6e493 -r 5de43b1eb9f4 rv34.c --- a/rv34.c Sat Mar 14 19:12:20 2009 +0000 +++ b/rv34.c Sun Mar 15 08:21:42 2009 +0000 @@ -533,7 +533,7 @@ B[1] = cur_pic->motion_val[dir][mv_pos - s->b8_stride][1]; has_B = 1; } - if((r->avail_cache[5-2] & type) & mask){ + if(r->avail_cache[5-4] && (r->avail_cache[5-2] & type) & mask){ C[0] = cur_pic->motion_val[dir][mv_pos - s->b8_stride + 2][0]; C[1] = cur_pic->motion_val[dir][mv_pos - s->b8_stride + 2][1]; has_C = 1;