Mercurial > mplayer.hg
comparison libswscale/rgb2rgb_template.c @ 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 | e949de41d25a |
comparison
equal
deleted
inserted
replaced
28994:a03804d10dbf | 28995:d50adcfcf99c |
---|---|
2823 ); | 2823 ); |
2824 count -= 7; | 2824 count -= 7; |
2825 } | 2825 } |
2826 #endif | 2826 #endif |
2827 while(count<0){ | 2827 while(count<0){ |
2828 dst0[count]= src0[4*count+0]+src1[4*count+0]; | 2828 dst0[count]= (src0[4*count+0]+src1[4*count+0])>>1; |
2829 dst1[count]= src0[4*count+2]+src1[4*count+2]; | 2829 dst1[count]= (src0[4*count+2]+src1[4*count+2])>>1; |
2830 count++; | 2830 count++; |
2831 } | 2831 } |
2832 } | 2832 } |
2833 | 2833 |
2834 static void RENAME(extract_odd2)(const uint8_t *src, uint8_t *dst0, uint8_t *dst1, x86_reg count) | 2834 static void RENAME(extract_odd2)(const uint8_t *src, uint8_t *dst0, uint8_t *dst1, x86_reg count) |
2870 : "r"(src), "r"(dst0), "r"(dst1) | 2870 : "r"(src), "r"(dst0), "r"(dst1) |
2871 ); | 2871 ); |
2872 count -= 7; | 2872 count -= 7; |
2873 } | 2873 } |
2874 #endif | 2874 #endif |
2875 src++; | |
2875 while(count<0){ | 2876 while(count<0){ |
2876 dst0[count]= src[4*count+0]; | 2877 dst0[count]= src[4*count+0]; |
2877 dst1[count]= src[4*count+2]; | 2878 dst1[count]= src[4*count+2]; |
2878 count++; | 2879 count++; |
2879 } | 2880 } |
2923 : "r"(src0), "r"(src1), "r"(dst0), "r"(dst1) | 2924 : "r"(src0), "r"(src1), "r"(dst0), "r"(dst1) |
2924 ); | 2925 ); |
2925 count -= 7; | 2926 count -= 7; |
2926 } | 2927 } |
2927 #endif | 2928 #endif |
2929 src0++; | |
2930 src1++; | |
2928 while(count<0){ | 2931 while(count<0){ |
2929 dst0[count]= src0[4*count+0]+src1[4*count+0]; | 2932 dst0[count]= (src0[4*count+0]+src1[4*count+0])>>1; |
2930 dst1[count]= src0[4*count+2]+src1[4*count+2]; | 2933 dst1[count]= (src0[4*count+2]+src1[4*count+2])>>1; |
2931 count++; | 2934 count++; |
2932 } | 2935 } |
2933 } | 2936 } |
2934 | 2937 |
2935 static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, | 2938 static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, |