summaryrefslogtreecommitdiff
path: root/libavcodec/x86/hpeldsp_init.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-14 10:18:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-14 10:18:46 +0200
commiteda9d97b7a1dcebc6684f88e4f6472e18bd6b9f0 (patch)
treedd392912ac784cc1bffad9ce312dd058cd8e768b /libavcodec/x86/hpeldsp_init.c
parent56ba3312574fee02c037066aeed861a1be53f1cd (diff)
parent46bb456853b197f4562de7acf5d42abf11ded9be (diff)
Merge commit '46bb456853b197f4562de7acf5d42abf11ded9be'
* commit '46bb456853b197f4562de7acf5d42abf11ded9be': x86: dsputil: Refactor pixels16 wrapper functions with a macro Conflicts: libavcodec/x86/hpeldsp_avg_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 cc1d39a91e..243f7247ee 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 */