From e632e37ab8e9865ab12423868dc5f2c26e425be3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 28 May 2015 21:54:02 +0200 Subject: vdpau: retrieve mixer parameters directly from the hw surface Always configure the vdpau mixer based on the current surface sent to it. Before this, we just hardcoded the chroma type, and the surface size was essentially a guess. Calling VdpVideoSurfaceGetParameters() on every surface is a bit suspicious, but it appears it's a cheap function (just requiring some locks and a table lookup). This way we avoid creating another complicated mechanism to carry around the actual surface parameters with a mp_image/AVFrame. --- video/out/vo_vdpau.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'video/out/vo_vdpau.c') diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index b92a7f2d3b..ecac6af208 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -115,7 +115,6 @@ struct vdpctx { uint64_t dropped_time; uint32_t vid_width, vid_height; uint32_t image_format; - VdpChromaType vdp_chroma_type; VdpYCbCrFormat vdp_pixel_format; bool rgb_mode; @@ -339,10 +338,8 @@ static int initialize_vdpau_objects(struct vo *vo) struct vdp_functions *vdp = vc->vdp; VdpStatus vdp_st; - mp_vdpau_get_format(vc->image_format, &vc->vdp_chroma_type, - &vc->vdp_pixel_format); + mp_vdpau_get_format(vc->image_format, NULL, &vc->vdp_pixel_format); - vc->video_mixer->chroma_type = vc->vdp_chroma_type; vc->video_mixer->initialized = false; if (win_x11_init_vdpau_flip_queue(vo) < 0) -- cgit v1.2.3