[FFmpeg-devel] [PATCH 3/7] Move away x86 specific code from rgb2rgb part 1

Ronald S. Bultje rsbultje
Thu Jan 20 01:32:12 CET 2011


Hi,

On Wed, Jan 19, 2011 at 6:46 PM, Luca Barbato <lu_zero at gentoo.org> wrote:
> @@ -133,6 +133,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) ?= 0x0000001f0000001fULL;
>
> ?void sws_rgb2rgb_init(int flags)
> ?{
> +
> ?#if HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX
> ? ? if (flags & SWS_CPU_CAPS_SSE2)
> ? ? ? ? rgb2rgb_init_SSE2();

Cosmetics. :-p.

[..]
> diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c
> new file mode 100644
> index 0000000..7c557fd
> --- /dev/null
> +++ b/libswscale/x86/rgb2rgb_template.c
> @@ -0,0 +1,2944 @@
> +/*
> + * software RGB to RGB converter
> + * pluralize by software PAL8 to RGB converter
> + * ? ? ? ? ? ? ?software YUV to YUV converter
> + * ? ? ? ? ? ? ?software YUV to RGB converter
[..]

This should be a git cp, so history is maintained, right? Other than
that the contents look good to me so I'd say go for this. Duplication
of the boilerplate code is fine for now, it allows us to optimize
further in the future.

Ronald



More information about the ffmpeg-devel mailing list