From 0ae8aebb89b5d0b2226a5d3852a9c72cd52da2ff Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Sep 2015 18:58:17 +0200 Subject: video: refactor GPU memcpy usage Make the GPU memcpy from the dxva2 code generally useful to other parts of the player. We need to check at configure time whether SSE intrinsics work at all. (At least in this form, they won't work on clang, for example. It also won't work on non-x86.) Introduce a mp_image_copy_gpu(), and make the dxva2 code use it. Do some awkward stuff to share the existing code used by mp_image_copy(). I'm hoping that FFmpeg will sooner or later provide a function like this, so we can remove most of this again. (There is a patch, bit it's stuck in limbo since forever.) All this is used by the following commit. --- wscript | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index 8093ea396c..63c74686fa 100644 --- a/wscript +++ b/wscript @@ -769,6 +769,11 @@ hwaccel_features = [ 'desc': 'libavcodec DXVA2 hwaccel', 'deps': [ 'win32' ], 'func': check_headers('libavcodec/dxva2.h', use='libav'), + }, { + 'name': 'sse4-intrinsics', + 'desc': 'GCC SSE4 intrinsics for GPU memcpy', + 'deps_any': [ 'dxva2-hwaccel' ], + 'func': check_cc(fragment=load_fragment('sse.c')), } ] -- cgit v1.2.3