summaryrefslogtreecommitdiffstats
path: root/video/vdpau_mixer.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-28 21:54:02 +0200
committerwm4 <wm4@nowhere>2015-05-28 21:54:02 +0200
commite632e37ab8e9865ab12423868dc5f2c26e425be3 (patch)
treec2df9e38eca487dffcdc2ed59312e31432d08028 /video/vdpau_mixer.h
parent939132cbd9d13e4f271b4ec3652598d793523374 (diff)
downloadmpv-e632e37ab8e9865ab12423868dc5f2c26e425be3.tar.bz2
mpv-e632e37ab8e9865ab12423868dc5f2c26e425be3.tar.xz
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.
Diffstat (limited to 'video/vdpau_mixer.h')
-rw-r--r--video/vdpau_mixer.h4
1 files changed, 3 insertions, 1 deletions
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;