summaryrefslogtreecommitdiffstats
path: root/video/mp_image.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-25 18:58:17 +0200
committerwm4 <wm4@nowhere>2015-09-25 19:18:16 +0200
commit0ae8aebb89b5d0b2226a5d3852a9c72cd52da2ff (patch)
tree4f9517ae03b50d21b534a8cfcdcbbdcdd8d326b5 /video/mp_image.h
parent361040f9d912140832192af78808218d601c7465 (diff)
downloadmpv-0ae8aebb89b5d0b2226a5d3852a9c72cd52da2ff.tar.bz2
mpv-0ae8aebb89b5d0b2226a5d3852a9c72cd52da2ff.tar.xz
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.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/mp_image.h b/video/mp_image.h
index f5759205f4..25eb42c050 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -106,6 +106,7 @@ int mp_chroma_div_up(int size, int shift);
struct mp_image *mp_image_alloc(int fmt, int w, int h);
void mp_image_copy(struct mp_image *dmpi, struct mp_image *mpi);
+void mp_image_copy_gpu(struct mp_image *dst, struct mp_image *src);
void mp_image_copy_attributes(struct mp_image *dmpi, struct mp_image *mpi);
struct mp_image *mp_image_new_copy(struct mp_image *img);
struct mp_image *mp_image_new_ref(struct mp_image *img);
@@ -159,4 +160,6 @@ void memcpy_pic(void *dst, const void *src, int bytesPerLine, int height,
void memset_pic(void *dst, int fill, int bytesPerLine, int height, int stride);
void memset16_pic(void *dst, int fill, int unitsPerLine, int height, int stride);
+void mp_check_gpu_memcpy(struct mp_log *log, bool *once);
+
#endif /* MPLAYER_MP_IMAGE_H */