diff options
author | wm4 <wm4@nowhere> | 2015-05-28 21:54:02 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-28 21:54:02 +0200 |
commit | e632e37ab8e9865ab12423868dc5f2c26e425be3 (patch) | |
tree | c2df9e38eca487dffcdc2ed59312e31432d08028 /video/out/vo_vdpau.c | |
parent | 939132cbd9d13e4f271b4ec3652598d793523374 (diff) | |
download | mpv-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/out/vo_vdpau.c')
-rw-r--r-- | video/out/vo_vdpau.c | 5 |
1 files changed, 1 insertions, 4 deletions
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) |