changeset 28995:d50adcfcf99c

10l: C code of extract_even2avg(), extract_odd2() and extract_odd2avg() was buggy and untested as the MMX* code was used and I forgot to explicitly test these functions with the MMX code disabled.
author michael
date Sat, 21 Mar 2009 23:52:34 +0000
parents a03804d10dbf
children 52f5616d6abf
files libswscale/rgb2rgb_template.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/rgb2rgb_template.c	Sat Mar 21 23:45:20 2009 +0000
+++ b/libswscale/rgb2rgb_template.c	Sat Mar 21 23:52:34 2009 +0000
@@ -2825,8 +2825,8 @@
     }
 #endif
     while(count<0){
-        dst0[count]= src0[4*count+0]+src1[4*count+0];
-        dst1[count]= src0[4*count+2]+src1[4*count+2];
+        dst0[count]= (src0[4*count+0]+src1[4*count+0])>>1;
+        dst1[count]= (src0[4*count+2]+src1[4*count+2])>>1;
         count++;
     }
 }
@@ -2872,6 +2872,7 @@
         count -= 7;
     }
 #endif
+    src++;
     while(count<0){
         dst0[count]= src[4*count+0];
         dst1[count]= src[4*count+2];
@@ -2925,9 +2926,11 @@
         count -= 7;
     }
 #endif
+    src0++;
+    src1++;
     while(count<0){
-        dst0[count]= src0[4*count+0]+src1[4*count+0];
-        dst1[count]= src0[4*count+2]+src1[4*count+2];
+        dst0[count]= (src0[4*count+0]+src1[4*count+0])>>1;
+        dst1[count]= (src0[4*count+2]+src1[4*count+2])>>1;
         count++;
     }
 }