summaryrefslogtreecommitdiffstats
path: root/video/vaapi.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-27 16:48:45 +0200
committerwm4 <wm4@nowhere>2013-09-27 17:59:44 +0200
commit4d2f354da651a3c1fd9776ed5829f57961a46c10 (patch)
treeaade31a57f48ec4b387ba19077154fca5012f62f /video/vaapi.h
parentede652774ee83d2d311763358a1d3b820d9f5e17 (diff)
downloadmpv-4d2f354da651a3c1fd9776ed5829f57961a46c10.tar.bz2
mpv-4d2f354da651a3c1fd9776ed5829f57961a46c10.tar.xz
vaapi: potentially make reading surfaces back to system RAM faster
Don't allocate a VAImage and a mp_image every time. VAImage are cached in the surfaces themselves, and for mp_image an explicit pool is created. The retry loop runs only once for each surface now. This also makes use of vaDeriveImage() if possible.
Diffstat (limited to 'video/vaapi.h')
-rw-r--r--video/vaapi.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/video/vaapi.h b/video/vaapi.h
index fa87658391..8e09193fd9 100644
--- a/video/vaapi.h
+++ b/video/vaapi.h
@@ -72,6 +72,8 @@
#include "mp_image.h"
+struct mp_image_pool;
+
struct mp_vaapi_ctx {
VADisplay display;
struct va_image_formats *image_formats;
@@ -117,6 +119,8 @@ struct mp_image * va_surface_wrap(struct va_surface *surface); // takes o
VASurfaceID va_surface_id(const struct va_surface *surface);
VASurfaceID va_surface_id_in_mp_image(const struct mp_image *mpi);
bool va_surface_upload(struct va_surface *surface, const struct mp_image *mpi);
-struct mp_image * va_surface_download(const struct va_surface *surface, const struct va_image_formats *formats);
+struct mp_image * va_surface_download(struct va_surface *surface,
+ const struct va_image_formats *formats,
+ struct mp_image_pool *pool);
#endif