aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/vp9dsp_init_16bpp.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-16 09:12:27 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-16 21:11:34 -0400
commit77f359670fdbfcd7ac2a464b3bc000b1ceb54763 (patch)
treee905721e7d759c126a7514f1dd730ce7a3d526fa /libavcodec/x86/vp9dsp_init_16bpp.c
parent6354ff03833b5f64d930c195ae3801cc4061505f (diff)
downloadffmpeg-77f359670fdbfcd7ac2a464b3bc000b1ceb54763.tar.gz
vp9: add fullpel (avg) MC SIMD for 10/12bpp.
Diffstat (limited to 'libavcodec/x86/vp9dsp_init_16bpp.c')
-rw-r--r--libavcodec/x86/vp9dsp_init_16bpp.c58
1 files changed, 42 insertions, 16 deletions
diff --git a/libavcodec/x86/vp9dsp_init_16bpp.c b/libavcodec/x86/vp9dsp_init_16bpp.c
index 6f2c50d04a..daf9cc5d6d 100644
--- a/libavcodec/x86/vp9dsp_init_16bpp.c
+++ b/libavcodec/x86/vp9dsp_init_16bpp.c
@@ -29,14 +29,22 @@
#if HAVE_YASM
-decl_fpel_func(put, 8, mmx);
-decl_fpel_func(put, 16, sse);
-decl_fpel_func(put, 32, sse);
-decl_fpel_func(put, 64, sse);
-decl_fpel_func(put, 128, sse);
-decl_fpel_func(put, 32, avx);
-decl_fpel_func(put, 64, avx);
-decl_fpel_func(put, 128, avx);
+decl_fpel_func(put, 8, , mmx);
+decl_fpel_func(avg, 8, _16, mmxext);
+decl_fpel_func(put, 16, , sse);
+decl_fpel_func(put, 32, , sse);
+decl_fpel_func(put, 64, , sse);
+decl_fpel_func(put, 128, , sse);
+decl_fpel_func(avg, 16, _16, sse2);
+decl_fpel_func(avg, 32, _16, sse2);
+decl_fpel_func(avg, 64, _16, sse2);
+decl_fpel_func(avg, 128, _16, sse2);
+decl_fpel_func(put, 32, , avx);
+decl_fpel_func(put, 64, , avx);
+decl_fpel_func(put, 128, , avx);
+decl_fpel_func(avg, 32, _16, avx2);
+decl_fpel_func(avg, 64, _16, avx2);
+decl_fpel_func(avg, 128, _16, avx2);
#endif /* HAVE_YASM */
@@ -46,19 +54,37 @@ av_cold void ff_vp9dsp_init_16bpp_x86(VP9DSPContext *dsp, int bpp)
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
- init_fpel_func(4, 0, 8, put, mmx);
+ init_fpel_func(4, 0, 8, put, , mmx);
+ }
+
+ if (EXTERNAL_MMXEXT(cpu_flags)) {
+ init_fpel_func(4, 1, 8, avg, _16, mmxext);
}
if (EXTERNAL_SSE(cpu_flags)) {
- init_fpel_func(3, 0, 16, put, sse);
- init_fpel_func(2, 0, 32, put, sse);
- init_fpel_func(1, 0, 64, put, sse);
- init_fpel_func(0, 0, 128, put, sse);
+ init_fpel_func(3, 0, 16, put, , sse);
+ init_fpel_func(2, 0, 32, put, , sse);
+ init_fpel_func(1, 0, 64, put, , sse);
+ init_fpel_func(0, 0, 128, put, , sse);
+ }
+
+ if (EXTERNAL_SSE2(cpu_flags)) {
+ init_fpel_func(3, 1, 16, avg, _16, sse2);
+ init_fpel_func(2, 1, 32, avg, _16, sse2);
+ init_fpel_func(1, 1, 64, avg, _16, sse2);
+ init_fpel_func(0, 1, 128, avg, _16, sse2);
}
+
if (EXTERNAL_AVX_FAST(cpu_flags)) {
- init_fpel_func(2, 0, 32, put, avx);
- init_fpel_func(1, 0, 64, put, avx);
- init_fpel_func(0, 0, 128, put, avx);
+ init_fpel_func(2, 0, 32, put, , avx);
+ init_fpel_func(1, 0, 64, put, , avx);
+ init_fpel_func(0, 0, 128, put, , avx);
+ }
+
+ if (EXTERNAL_AVX2(cpu_flags)) {
+ init_fpel_func(2, 1, 32, avg, _16, avx2);
+ init_fpel_func(1, 1, 64, avg, _16, avx2);
+ init_fpel_func(0, 1, 128, avg, _16, avx2);
}
#endif /* HAVE_YASM */