[FFmpeg-devel] [PATCH] make building swscale rgb template conditional

Michael Niedermayer michaelni
Tue Aug 17 12:39:41 CEST 2010


On Sun, Aug 15, 2010 at 10:34:47PM +0200, Luca Barbato wrote:
> $subj + why the sse2 variant is always disabled?
> 
> lu
> 
> -- 
> 
> Luca Barbato
> Gentoo/linux
> http://dev.gentoo.org/~lu_zero
> 

>  rgb2rgb.c          |   78 ++++++++++++++++++------------
>  rgb2rgb_template.c |  134 ++++++++++++++++++++++++++---------------------------
>  2 files changed, 114 insertions(+), 98 deletions(-)
> 5c27bf038a4cebac04892e6434ff946149b89a22  swscale-make-rgb-templates-build-conditional.diff
> diff --git a/rgb2rgb.c b/rgb2rgb.c
> index f92e165..3a6395a 100644
> --- a/rgb2rgb.c
> +++ b/rgb2rgb.c
> @@ -148,41 +148,57 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask)  = 0x0000001f0000001fULL;
>  
>  //Note: We have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW + MMX2 one.
>  //plain C versions
> -#undef HAVE_MMX
> -#undef HAVE_MMX2
> -#undef HAVE_AMD3DNOW
> -#undef HAVE_SSE2
> -#define HAVE_MMX 0
> -#define HAVE_MMX2 0
> -#define HAVE_AMD3DNOW 0
> -#define HAVE_SSE2 0
> +
> +#define TEMPLATE_SSE2 0 // never enabled.
> +
> +#define TEMPLATE_MMX 0
> +#define TEMPLATE_MMX2 0
> +#define TEMPLATE_AMD3DNOW 0
>  #define RENAME(a) a ## _C
>  #include "rgb2rgb_template.c"
> +#undef RENAME
> +#undef TEMPLATE_AMD3DNOW
> +#undef TEMPLATE_MMX2
> +#undef TEMPLATE_MMX
>  
>  #if ARCH_X86
>  
>  //MMX versions
> -#undef RENAME
> -#undef HAVE_MMX
> -#define HAVE_MMX 1
> -#define RENAME(a) a ## _MMX
> -#include "rgb2rgb_template.c"
> -
> +#ifdef HAVE_MMX
> +#   define TEMPLATE_MMX 1
> +#   define TEMPLATE_MMX2 0
> +#   define TEMPLATE_AMD3DNOW 0
> +#   define RENAME(a) a ## _MMX
> +#   include "rgb2rgb_template.c"
> +#   undef RENAME
> +#   undef TEMPLATE_AMD3DNOW
> +#   undef TEMPLATE_MMX2
> +#   undef TEMPLATE_MMX

inconsistent to the names used in swscale*


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100817/45da616e/attachment.pgp>



More information about the ffmpeg-devel mailing list