]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Correct MV prediction for B-frame blocks in RV4 decoder
authorkostya <kostya@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 15 Mar 2009 08:21:42 +0000 (08:21 +0000)
committerkostya <kostya@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 15 Mar 2009 08:21:42 +0000 (08:21 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17974 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/rv34.c

index ee105280b35b5e1d7bbff296eadc740736f7dc24..66036414d547cc44753f9734b8bfc147dead3b6e 100644 (file)
@@ -533,7 +533,7 @@ static void rv34_pred_mv_b(RV34DecContext *r, int block_type, int dir)
         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;