summaryrefslogtreecommitdiffstats
path: root/video/out
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/out
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/out')
-rw-r--r--video/out/vo_vaapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_vaapi.c b/video/out/vo_vaapi.c
index 68fb09ff9b..4f79bbbd1f 100644
--- a/video/out/vo_vaapi.c
+++ b/video/out/vo_vaapi.c
@@ -266,7 +266,8 @@ static struct mp_image *get_screenshot(struct priv *p)
va_surface_in_mp_image(p->output_surfaces[p->visible_surface]);
if (!surface)
return NULL;
- struct mp_image *img = va_surface_download(surface, p->va_image_formats);
+ struct mp_image *img =
+ va_surface_download(surface, p->va_image_formats, NULL);
if (!img)
return NULL;
struct mp_image_params params = p->image_params;