forked from FFmpeg/FFmpeg
pp: add support for SSE2.
This commit is contained in:
parent
f6be711a69
commit
4e264d1c79
2 changed files with 22 additions and 3 deletions
|
@ -557,8 +557,13 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
|
||||||
# include "postprocess_template.c"
|
# include "postprocess_template.c"
|
||||||
# define TEMPLATE_PP_3DNOW 1
|
# define TEMPLATE_PP_3DNOW 1
|
||||||
# include "postprocess_template.c"
|
# include "postprocess_template.c"
|
||||||
|
# define TEMPLATE_PP_SSE2 1
|
||||||
|
# include "postprocess_template.c"
|
||||||
# else
|
# else
|
||||||
# if HAVE_MMXEXT_INLINE
|
# if HAVE_SSE2_INLINE
|
||||||
|
# define TEMPLATE_PP_SSE2 1
|
||||||
|
# include "postprocess_template.c"
|
||||||
|
# elif HAVE_MMXEXT_INLINE
|
||||||
# define TEMPLATE_PP_MMXEXT 1
|
# define TEMPLATE_PP_MMXEXT 1
|
||||||
# include "postprocess_template.c"
|
# include "postprocess_template.c"
|
||||||
# elif HAVE_AMD3DNOW_INLINE
|
# elif HAVE_AMD3DNOW_INLINE
|
||||||
|
@ -586,14 +591,17 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[]
|
||||||
#if CONFIG_RUNTIME_CPUDETECT
|
#if CONFIG_RUNTIME_CPUDETECT
|
||||||
#if ARCH_X86 && HAVE_INLINE_ASM
|
#if ARCH_X86 && HAVE_INLINE_ASM
|
||||||
// ordered per speed fastest first
|
// ordered per speed fastest first
|
||||||
if (c->cpuCaps & AV_CPU_FLAG_MMXEXT) pp = postProcess_MMX2;
|
if (c->cpuCaps & AV_CPU_FLAG_SSE2) pp = postProcess_SSE2;
|
||||||
|
else if (c->cpuCaps & AV_CPU_FLAG_MMXEXT) pp = postProcess_MMX2;
|
||||||
else if (c->cpuCaps & AV_CPU_FLAG_3DNOW) pp = postProcess_3DNow;
|
else if (c->cpuCaps & AV_CPU_FLAG_3DNOW) pp = postProcess_3DNow;
|
||||||
else if (c->cpuCaps & AV_CPU_FLAG_MMX) pp = postProcess_MMX;
|
else if (c->cpuCaps & AV_CPU_FLAG_MMX) pp = postProcess_MMX;
|
||||||
#elif HAVE_ALTIVEC
|
#elif HAVE_ALTIVEC
|
||||||
if (c->cpuCaps & AV_CPU_FLAG_ALTIVEC) pp = postProcess_altivec;
|
if (c->cpuCaps & AV_CPU_FLAG_ALTIVEC) pp = postProcess_altivec;
|
||||||
#endif
|
#endif
|
||||||
#else /* CONFIG_RUNTIME_CPUDETECT */
|
#else /* CONFIG_RUNTIME_CPUDETECT */
|
||||||
#if HAVE_MMXEXT_INLINE
|
#if HAVE_SSE2_INLINE
|
||||||
|
pp = postProcess_SSE2;
|
||||||
|
#elif HAVE_MMXEXT_INLINE
|
||||||
pp = postProcess_MMX2;
|
pp = postProcess_MMX2;
|
||||||
#elif HAVE_AMD3DNOW_INLINE
|
#elif HAVE_AMD3DNOW_INLINE
|
||||||
pp = postProcess_3DNow;
|
pp = postProcess_3DNow;
|
||||||
|
|
|
@ -64,6 +64,16 @@
|
||||||
# define TEMPLATE_PP_3DNOW 0
|
# define TEMPLATE_PP_3DNOW 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TEMPLATE_PP_SSE2
|
||||||
|
# undef TEMPLATE_PP_MMX
|
||||||
|
# define TEMPLATE_PP_MMX 1
|
||||||
|
# undef TEMPLATE_PP_MMXEXT
|
||||||
|
# define TEMPLATE_PP_MMXEXT 1
|
||||||
|
# define RENAME(a) a ## _SSE2
|
||||||
|
#else
|
||||||
|
# define TEMPLATE_PP_SSE2 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef REAL_PAVGB
|
#undef REAL_PAVGB
|
||||||
#undef PAVGB
|
#undef PAVGB
|
||||||
#undef PMINUB
|
#undef PMINUB
|
||||||
|
@ -3675,3 +3685,4 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
|
||||||
#undef TEMPLATE_PP_MMX
|
#undef TEMPLATE_PP_MMX
|
||||||
#undef TEMPLATE_PP_MMXEXT
|
#undef TEMPLATE_PP_MMXEXT
|
||||||
#undef TEMPLATE_PP_3DNOW
|
#undef TEMPLATE_PP_3DNOW
|
||||||
|
#undef TEMPLATE_PP_SSE2
|
||||||
|
|
Loading…
Add table
Reference in a new issue