changeset 3711:4a5536551692 libavcodec

Swap back and forward motion vectors to achieve correct picture
author kostya
date Tue, 12 Sep 2006 04:35:11 +0000
parents 08280665be40
children f7f75f718efb
files vc1.c
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vc1.c	Tue Sep 12 04:29:37 2006 +0000
+++ b/vc1.c	Tue Sep 12 04:35:11 2006 +0000
@@ -2104,6 +2104,16 @@
  */
 static inline void vc1_b_mc(VC1Context *v, int dmv_x[2], int dmv_y[2], int direct, int mode)
 {
+    int t;
+
+    //XXX: more elegant solution is possible
+    t = v->s.mv[0][0][0];
+    v->s.mv[0][0][0] = v->s.mv[1][0][0];
+    v->s.mv[1][0][0] = t;
+    t = v->s.mv[0][0][1];
+    v->s.mv[0][0][1] = v->s.mv[1][0][1];
+    v->s.mv[1][0][1] = t;
+
     if(direct) {
         vc1_mc_1mv(v, 0);
         vc1_interp_mc(v);
@@ -2115,7 +2125,7 @@
         return;
     }
 
-    vc1_mc_1mv(v, (mode == BMV_TYPE_FORWARD));
+    vc1_mc_1mv(v, (mode == BMV_TYPE_BACKWARD));
 }
 
 static inline void vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], int direct, int mvtype)