changeset 3419:b4363f96013d libavcodec

Fix one case of choosing MV for chroma
author kostya
date Thu, 06 Jul 2006 03:42:51 +0000
parents ecdc24320e47
children 54814e15aa3d
files vc1.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/vc1.c	Wed Jul 05 22:56:45 2006 +0000
+++ b/vc1.c	Thu Jul 06 03:42:51 2006 +0000
@@ -1080,7 +1080,7 @@
     }
 
     /* calculate chroma MV vector from four luma MVs */
-    idx = (intra[0] << 3) | (intra[1] << 2) | (intra[2] << 1) | intra[3];
+    idx = (intra[3] << 3) | (intra[2] << 2) | (intra[1] << 1) | intra[0];
     if(!idx) { // all blocks are inter
         tx = median4(mvx[0], mvx[1], mvx[2], mvx[3]);
         ty = median4(mvy[0], mvy[1], mvy[2], mvy[3]);
@@ -1088,19 +1088,19 @@
         switch(idx) {
         case 0x1:
             tx = mid_pred(mvx[1], mvx[2], mvx[3]);
-            tx = mid_pred(mvy[1], mvy[2], mvy[3]);
+            ty = mid_pred(mvy[1], mvy[2], mvy[3]);
             break;
         case 0x2:
             tx = mid_pred(mvx[0], mvx[2], mvx[3]);
-            tx = mid_pred(mvy[0], mvy[2], mvy[3]);
+            ty = mid_pred(mvy[0], mvy[2], mvy[3]);
             break;
         case 0x4:
             tx = mid_pred(mvx[0], mvx[1], mvx[3]);
-            tx = mid_pred(mvy[0], mvy[1], mvy[3]);
+            ty = mid_pred(mvy[0], mvy[1], mvy[3]);
             break;
         case 0x8:
             tx = mid_pred(mvx[0], mvx[1], mvx[2]);
-            tx = mid_pred(mvy[0], mvy[1], mvy[2]);
+            ty = mid_pred(mvy[0], mvy[1], mvy[2]);
             break;
         }
     } else if(count[idx] == 2) {