From 74581a61064f56b170e555fa72d9cdca161d2307 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Jan 2015 17:47:14 +0100 Subject: video: handle hwdec screenshots differently Instead of converting the hw surface to an image in the VO, provide a generic way to convet hw surfaces, and use this in the screenshot code. It's all relatively straightforward, except vdpau is being terrible. It needs a huge chunk of new code, because copying back is not simple. --- video/mp_image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'video/mp_image.c') diff --git a/video/mp_image.c b/video/mp_image.c index 95ed5ae08a..cf17429d89 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -372,6 +372,7 @@ void mp_image_copy_attributes(struct mp_image *dst, struct mp_image *src) dst->params.chroma_location = src->params.chroma_location; dst->params.outputlevels = src->params.outputlevels; } + mp_image_params_guess_csp(&dst->params); // ensure colorspace consistency if ((dst->fmt.flags & MP_IMGFLAG_PAL) && (src->fmt.flags & MP_IMGFLAG_PAL)) { if (dst->planes[1] && src->planes[1]) memcpy(dst->planes[1], src->planes[1], MP_PALETTE_SIZE); -- cgit v1.2.3