From 4d2f354da651a3c1fd9776ed5829f57961a46c10 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 27 Sep 2013 16:48:45 +0200 Subject: 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. --- video/out/vo_vaapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/vo_vaapi.c') 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; -- cgit v1.2.3