summaryrefslogtreecommitdiffstats
path: root/libvo/vo_vdpau.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-26 19:29:47 +0200
committerwm4 <wm4@nowhere>2012-11-01 02:07:45 +0100
commit738aeb1c60c6ffe95e915e443598f8a51081bdfb (patch)
treec10472cd8e646344d0d5e2bf1644adcb002c424a /libvo/vo_vdpau.c
parent9ba52ea6efd41db9dbd08311380f7fa633e22aa2 (diff)
downloadmpv-738aeb1c60c6ffe95e915e443598f8a51081bdfb.tar.bz2
mpv-738aeb1c60c6ffe95e915e443598f8a51081bdfb.tar.xz
screenshot: let VOs pass colorspace information via mp_image
This removes the hack that screenshot_save() got the colorspace information from the decoder. Instead, require the VOs to set the colorspace information on the mp_images used to pass around the screenshot data. This is more correct, as the image may have been converted/modified in the video filter chain, although there's nothing yet in the video filter chain which does this correctly.
Diffstat (limited to 'libvo/vo_vdpau.c')
-rw-r--r--libvo/vo_vdpau.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index ba0e0993a2..3f5b7bc660 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -1365,6 +1365,8 @@ static struct mp_image *read_output_surface(struct vdpctx *vc,
VdpStatus vdp_st;
struct vdp_functions *vdp = vc->vdp;
struct mp_image *image = alloc_mpi(width, height, IMGFMT_BGR32);
+ image->colorspace = MP_CSP_RGB;
+ image->levels = vc->colorspace.levels_out; // hardcoded with conv. matrix
void *dst_planes[] = { image->planes[0] };
uint32_t dst_pitches[] = { image->stride[0] };