mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
swscale/x86/yuv2rgb: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
608319a311
commit
2831837182
@ -44,23 +44,22 @@
|
|||||||
//MMX versions
|
//MMX versions
|
||||||
#if HAVE_MMX
|
#if HAVE_MMX
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef COMPILE_TEMPLATE_MMXEXT
|
#define COMPILE_TEMPLATE_MMX
|
||||||
#define COMPILE_TEMPLATE_MMXEXT 0
|
|
||||||
#define RENAME(a) a ## _mmx
|
#define RENAME(a) a ## _mmx
|
||||||
#include "yuv2rgb_template.c"
|
#include "yuv2rgb_template.c"
|
||||||
|
#undef COMPILE_TEMPLATE_MMX
|
||||||
#endif /* HAVE_MMX */
|
#endif /* HAVE_MMX */
|
||||||
|
|
||||||
// MMXEXT versions
|
// MMXEXT versions
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef COMPILE_TEMPLATE_MMXEXT
|
#define COMPILE_TEMPLATE_MMXEXT
|
||||||
#define COMPILE_TEMPLATE_MMXEXT 1
|
|
||||||
#define RENAME(a) a ## _mmxext
|
#define RENAME(a) a ## _mmxext
|
||||||
#include "yuv2rgb_template.c"
|
#include "yuv2rgb_template.c"
|
||||||
|
#undef COMPILE_TEMPLATE_MMXEXT
|
||||||
|
|
||||||
//SSSE3 versions
|
//SSSE3 versions
|
||||||
#undef RENAME
|
#undef RENAME
|
||||||
#undef COMPILE_TEMPLATE_MMXEXT
|
#define COMPILE_TEMPLATE_SSSE3
|
||||||
#define COMPILE_TEMPLATE_MMXEXT 0
|
|
||||||
#define RENAME(a) a ## _ssse3
|
#define RENAME(a) a ## _ssse3
|
||||||
#include "yuv2rgb_template.c"
|
#include "yuv2rgb_template.c"
|
||||||
|
|
||||||
@ -127,10 +126,6 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
|||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
return yuv420_bgr32_mmx;
|
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:
|
case AV_PIX_FMT_RGB565:
|
||||||
return yuv420_rgb16_mmx;
|
return yuv420_rgb16_mmx;
|
||||||
case AV_PIX_FMT_RGB555:
|
case AV_PIX_FMT_RGB555:
|
||||||
|
@ -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 *pv_index, const uint64_t *pointer_c_dither,
|
||||||
const uint8_t *py_2index);
|
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,
|
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 *pv_index, const uint64_t *pointer_c_dither,
|
||||||
const uint8_t *py_2index);
|
const uint8_t *py_2index);
|
||||||
@ -165,6 +165,7 @@ static inline int RENAME(yuva420_bgr32)(SwsContext *c, const uint8_t *src[],
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(COMPILE_TEMPLATE_MMX)
|
||||||
static inline int RENAME(yuv420_rgb24)(SwsContext *c, const uint8_t *src[],
|
static inline int RENAME(yuv420_rgb24)(SwsContext *c, const uint8_t *src[],
|
||||||
int srcStride[],
|
int srcStride[],
|
||||||
int srcSliceY, int srcSliceH,
|
int srcSliceY, int srcSliceH,
|
||||||
@ -192,4 +193,4 @@ static inline int RENAME(yuv420_bgr24)(SwsContext *c, const uint8_t *src[],
|
|||||||
}
|
}
|
||||||
return srcSliceH;
|
return srcSliceH;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -69,6 +69,9 @@ SECTION .text
|
|||||||
%ifidn %1, yuva
|
%ifidn %1, yuva
|
||||||
%define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index, pa_2index
|
%define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index, pa_2index
|
||||||
%define GPR_num 7
|
%define GPR_num 7
|
||||||
|
%else
|
||||||
|
%define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index
|
||||||
|
%define GPR_num 6
|
||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index
|
%define parameters index, image, pu_index, pv_index, pointer_c_dither, py_2index
|
||||||
@ -356,8 +359,6 @@ REP_RET
|
|||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
INIT_MMX mmx
|
INIT_MMX mmx
|
||||||
yuv2rgb_fn yuv, rgb, 24
|
|
||||||
yuv2rgb_fn yuv, bgr, 24
|
|
||||||
yuv2rgb_fn yuv, rgb, 32
|
yuv2rgb_fn yuv, rgb, 32
|
||||||
yuv2rgb_fn yuv, bgr, 32
|
yuv2rgb_fn yuv, bgr, 32
|
||||||
yuv2rgb_fn yuva, rgb, 32
|
yuv2rgb_fn yuva, rgb, 32
|
||||||
|
Loading…
Reference in New Issue
Block a user