summaryrefslogtreecommitdiff
path: root/libavcodec/x86/hpeldsp_init.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-04-20 20:28:28 +0200
committerDiego Biurrun <diego@biurrun.de>2013-05-12 22:28:07 +0200
commit46bb456853b197f4562de7acf5d42abf11ded9be (patch)
tree1a371d94273a54680e8c581743e3aed9a6a311b2 /libavcodec/x86/hpeldsp_init.c
parent2c2c48a9bdbef51177204dfc2f151f3be257f9b8 (diff)
x86: dsputil: Refactor pixels16 wrapper functions with a macro
Diffstat (limited to 'libavcodec/x86/hpeldsp_init.c')
-rw-r--r--libavcodec/x86/hpeldsp_init.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c
index 739099ee17..0617c22c6e 100644
--- a/libavcodec/x86/hpeldsp_init.c
+++ b/libavcodec/x86/hpeldsp_init.c
@@ -105,6 +105,13 @@ void ff_avg_pixels8_xy2_3dnow(uint8_t *block, const uint8_t *pixels,
#undef PAVGBP
#undef PAVGB
#undef STATIC
+
+PIXELS16(static, avg_no_rnd, , _y2, _mmx)
+PIXELS16(static, put_no_rnd, , _y2, _mmx)
+
+PIXELS16(static, avg_no_rnd, , _xy2, _mmx)
+PIXELS16(static, put_no_rnd, , _xy2, _mmx)
+
/***********************************/
/* MMX rounding */
@@ -120,27 +127,25 @@ void ff_avg_pixels8_xy2_3dnow(uint8_t *block, const uint8_t *pixels,
#undef PAVGBP
#undef PAVGB
+PIXELS16(static, avg, , _y2, _mmx)
+PIXELS16(static, put, , _y2, _mmx)
+
#endif /* HAVE_INLINE_ASM */
#if HAVE_YASM
-/***********************************/
-/* 3Dnow specific */
-
-#define DEF(x) x ## _3dnow
-
-#include "hpeldsp_avg_template.c"
-#undef DEF
-
-/***********************************/
-/* MMXEXT specific */
-
-#define DEF(x) x ## _mmxext
-
-#include "hpeldsp_avg_template.c"
-
-#undef DEF
+#define HPELDSP_AVG_PIXELS16(CPUEXT) \
+ PIXELS16(static, put_no_rnd, ff_, _x2, CPUEXT) \
+ PIXELS16(static, put, ff_, _y2, CPUEXT) \
+ PIXELS16(static, put_no_rnd, ff_, _y2, CPUEXT) \
+ PIXELS16(static, avg, ff_, , CPUEXT) \
+ PIXELS16(static, avg, ff_, _x2, CPUEXT) \
+ PIXELS16(static, avg, ff_, _y2, CPUEXT) \
+ PIXELS16(static, avg, ff_, _xy2, CPUEXT)
+
+HPELDSP_AVG_PIXELS16(_3dnow)
+HPELDSP_AVG_PIXELS16(_mmxext)
#endif /* HAVE_YASM */