diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c index 47f45bd7c2..6754062245 100644 --- a/libswscale/x86/yuv2rgb.c +++ b/libswscale/x86/yuv2rgb.c @@ -44,23 +44,22 @@ //MMX versions #if HAVE_MMX #undef RENAME -#undef COMPILE_TEMPLATE_MMXEXT -#define COMPILE_TEMPLATE_MMXEXT 0 +#define COMPILE_TEMPLATE_MMX #define RENAME(a) a ## _mmx #include "yuv2rgb_template.c" +#undef COMPILE_TEMPLATE_MMX #endif /* HAVE_MMX */ // MMXEXT versions #undef RENAME -#undef COMPILE_TEMPLATE_MMXEXT -#define COMPILE_TEMPLATE_MMXEXT 1 +#define COMPILE_TEMPLATE_MMXEXT #define RENAME(a) a ## _mmxext #include "yuv2rgb_template.c" +#undef COMPILE_TEMPLATE_MMXEXT //SSSE3 versions #undef RENAME -#undef COMPILE_TEMPLATE_MMXEXT -#define COMPILE_TEMPLATE_MMXEXT 0 +#define COMPILE_TEMPLATE_SSSE3 #define RENAME(a) a ## _ssse3 #include "yuv2rgb_template.c" @@ -127,10 +126,6 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c) break; } else return yuv420_bgr32_mmx; - case AV_PIX_FMT_RGB24: - return yuv420_rgb24_mmx; - case AV_PIX_FMT_BGR24: - return yuv420_bgr24_mmx; case AV_PIX_FMT_RGB565: return yuv420_rgb16_mmx; case AV_PIX_FMT_RGB555: diff --git a/libswscale/x86/yuv2rgb_template.c b/libswscale/x86/yuv2rgb_template.c index d506f75e15..596943bb73 100644 --- a/libswscale/x86/yuv2rgb_template.c +++ b/libswscale/x86/yuv2rgb_template.c @@ -47,7 +47,7 @@ extern void RENAME(ff_yuv_420_bgr24)(x86_reg index, uint8_t *image, const uint8_ const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index); -#if !COMPILE_TEMPLATE_MMXEXT +#ifndef COMPILE_TEMPLATE_MMXEXT extern void RENAME(ff_yuv_420_rgb15)(x86_reg index, uint8_t *image, const uint8_t *pu_index, const uint8_t *pv_index, const uint64_t *pointer_c_dither, const uint8_t *py_2index); @@ -165,6 +165,7 @@ static inline int RENAME(yuva420_bgr32)(SwsContext *c, const uint8_t *src[], } #endif +#if !defined(COMPILE_TEMPLATE_MMX) static inline int RENAME(yuv420_rgb24)(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, @@ -192,4 +193,4 @@ static inline int RENAME(yuv420_bgr24)(SwsContext *c, const uint8_t *src[], } return srcSliceH; } - +#endif diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm index f968b3a0a2..c5fa3ee690 100644 --- a/libswscale/x86/yuv_2_rgb.asm +++ b/libswscale/x86/yuv_2_rgb.asm @@ -69,6 +69,9 @@ SECTION .text %ifidn %1, yuva %define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index, pa_2index %define GPR_num 7 + %else + %define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index + %define GPR_num 6 %endif %else %define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index @@ -356,8 +359,6 @@ REP_RET %endmacro INIT_MMX mmx -yuv2rgb_fn yuv, rgb, 24 -yuv2rgb_fn yuv, bgr, 24 yuv2rgb_fn yuv, rgb, 32 yuv2rgb_fn yuv, bgr, 32 yuv2rgb_fn yuva, rgb, 32