diff options
author | wm4 <wm4@nowhere> | 2015-01-22 17:47:14 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-22 18:18:23 +0100 |
commit | 74581a61064f56b170e555fa72d9cdca161d2307 (patch) | |
tree | 532223eaa3644b01501d443ebca9011ee12af963 /video/mp_image.c | |
parent | e9ac3fc3a1505c4db1773a2a24d35ac41ab69887 (diff) | |
download | mpv-74581a61064f56b170e555fa72d9cdca161d2307.tar.bz2 mpv-74581a61064f56b170e555fa72d9cdca161d2307.tar.xz |
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.
Diffstat (limited to 'video/mp_image.c')
-rw-r--r-- | video/mp_image.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |