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/vdpau_mixer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video/vdpau_mixer.h') diff --git a/video/vdpau_mixer.h b/video/vdpau_mixer.h index f9a795375e..97bef86d3f 100644 --- a/video/vdpau_mixer.h +++ b/video/vdpau_mixer.h @@ -34,7 +34,9 @@ struct mp_vdpau_mixer { struct mp_image_params image_params; struct mp_vdpau_mixer_opts opts; - VdpChromaType chroma_type; + + VdpChromaType current_chroma_type; + int current_w, current_h; // set initialized=false to force reinit when changed struct mp_csp_equalizer video_eq; -- cgit v1.2.3