[FFmpeg-devel] [PATCH 6/6] swscale/yuv2rgb/x86: remove mmx/mmxext yuv2rgb functions

James Almer jamrial at gmail.com
Mon Jun 17 02:15:47 EEST 2024


On 6/16/2024 7:28 PM, Ramiro Polla wrote:
> These functions are either slower or barely faster than the C LUT
> yuv2rgb code.
> ---
>   libswscale/x86/yuv2rgb.c          | 51 -----------------
>   libswscale/x86/yuv2rgb_template.c |  4 --
>   libswscale/x86/yuv_2_rgb.asm      | 93 +------------------------------
>   3 files changed, 3 insertions(+), 145 deletions(-)
> 
> diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
> index 6754062245..41dfa80f33 100644
> --- a/libswscale/x86/yuv2rgb.c
> +++ b/libswscale/x86/yuv2rgb.c
> @@ -41,25 +41,8 @@
>   
>   #define DITHER1XBPP // only for MMX

Shouldn't this be removed too?

>   
> -//MMX versions
> -#if HAVE_MMX
> -#undef RENAME
> -#define COMPILE_TEMPLATE_MMX
> -#define RENAME(a) a ## _mmx
> -#include "yuv2rgb_template.c"
> -#undef COMPILE_TEMPLATE_MMX
> -#endif /* HAVE_MMX */
> -
> -// MMXEXT versions
> -#undef RENAME
> -#define COMPILE_TEMPLATE_MMXEXT
> -#define RENAME(a) a ## _mmxext
> -#include "yuv2rgb_template.c"
> -#undef COMPILE_TEMPLATE_MMXEXT
> -
>   //SSSE3 versions
>   #undef RENAME
> -#define COMPILE_TEMPLATE_SSSE3
>   #define RENAME(a) a ## _ssse3
>   #include "yuv2rgb_template.c"

You could write a seventh patch that moves the template stuff back to 
this file, now that SSSE3 is the only version. See commit 8b62fb231a78.


More information about the ffmpeg-devel mailing list