changeset 4247:c2224aefb923 libavcodec

100l FastUVMC rounding was incorrect. This should also improve quality on WMV9Drifting.asf
author kostya
date Fri, 01 Dec 2006 07:24:56 +0000
parents a579dae361e2
children 4be0e20c0eeb
files vc1.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/vc1.c	Thu Nov 30 22:44:22 2006 +0000
+++ b/vc1.c	Fri Dec 01 07:24:56 2006 +0000
@@ -879,8 +879,8 @@
     }
 
     if(v->fastuvmc) {
-        uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1));
-        uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
+        uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
+        uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
     }
 
     if(s->mspel) {
@@ -1103,8 +1103,8 @@
     }
 
     if(v->fastuvmc) {
-        uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1));
-        uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
+        uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
+        uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
     }
 
     /* Chroma MC always uses qpel bilinear */
@@ -2124,8 +2124,8 @@
     }
 
     if(v->fastuvmc) {
-        uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1));
-        uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1));
+        uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1));
+        uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1));
     }
 
     mx >>= 1;