# HG changeset patch # User michael # Date 1237679554 0 # Node ID d50adcfcf99c26893273f96dace11cc9873eb808 # Parent a03804d10dbf637090559adb6dc677e78ee356a9 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. diff -r a03804d10dbf -r d50adcfcf99c libswscale/rgb2rgb_template.c --- 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++; } }