[Mplayer-cvslog] CVS: main/postproc swscale.c,1.21,1.22 swscale.h,1.1,1.2
Michael Niedermayer
michaelni at gmx.at
Sun Oct 28 20:43:06 CET 2001
Hi
On Sunday 28 October 2001 20:08, Nick Kurshev wrote:
> Hello, Michael!
...
> [snip]
>
> I've study your stuff. Let me some minor warnings:
> 1. Why you don't use SFENCE?
oops
> 2. Why you ignore 3DNOW optimization?
do i?!
>
> I want suggest you to make some changes:
>
> 1.
> #include "../mmx_defs.h"
ok
>
> 2.
> It would be more readable to have:
> - MOVNTQ(%%mm0, (%4, %%eax, 4))\
> - MOVNTQ(%%mm2, 8(%4, %%eax, 4))\
> - MOVNTQ(%%mm1, 16(%4, %%eax, 4))\
> - MOVNTQ(%%mm3, 24(%4, %%eax, 4))\
> + MOVNTQ" %%mm0, (%4, %%eax, 4)\n\t"\
> + MOVNTQ" %%mm2, 8(%4, %%eax, 4)\n\t"\
> + MOVNTQ" %%mm1, 16(%4, %%eax, 4)\n\t"\
> + MOVNTQ" %%mm3, 24(%4, %%eax, 4)\n\t"\
> (Althrough it's looks like cosmetic)
i dont see why this would be better
> 3.
> -#ifdef HAVE_MMX2
> -#define FUNNY_Y_CODE \
> - "prefetchnta 1024(%%esi) \n\t"\
> - "prefetchnta 1056(%%esi) \n\t"\
> - "prefetchnta 1088(%%esi) \n\t"\
> - "call funnyYCode \n\t"\
> - "movq temp0, %%mm2 \n\t"\
> - "xorl %%ecx, %%ecx \n\t"
> -#else
> #define FUNNY_Y_CODE \
> + PREFETCH" 1024(%%esi) \n\t"\
> + PREFETCH" 1056(%%esi) \n\t"\
> + PREFETCH" 1088(%%esi) \n\t"\
> "call funnyYCode \n\t"\
> "movq temp0, %%mm2 \n\t"\
> "xorl %%ecx, %%ecx \n\t"
> -#endif
ok
>
> 4.
> -#ifdef HAVE_3DNOW
> - asm volatile("femms");
> -#elif defined (HAVE_MMX)
> - asm volatile("emms");
> -#endif
> + __asm __volatile(SFENCE:::"memory");
> + __asm __volatile(EMMS:::"memory");
ok
>
> 5. before every C loop:
> + __asm __volatile(SFENCE:::"memory");
> #else
> //FIXME unroll C loop and dont recalculate UV
> if(dstbpp==32 || dstbpp==24)
not ok, because it might slow things down, and i never touch data after
movntq so i doubt it would have any effect
Michael
More information about the MPlayer-cvslog
mailing list