From ffbf6037cb4a3e23f467f389186b06ebea9e57da Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Apr 2014 15:14:19 +0200 Subject: vo_vdpau: apply vo_vdpau postprocessing options The previous commits changed vo_vdpau so that these options are set by vf_vdpaupp, and the corresponding vo_vdpau were ignored. But for compatibility, keep the "old" options working. The value of this is questionable - maybe the vo_vdpau options should just be removed. For now, at least demonstrate that it's possible. The "deint" suboption still doesn't work, because the framerate doubling logic required for some deint modes was moved to vf_vdpaupp. This requires more elaborate workarounds. --- video/out/vo_vdpau.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 4904d78dd1..fbcb1e9917 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -204,8 +204,22 @@ static int render_video_to_output_surface(struct vo *vo, return 0; } - mp_vdpau_mixer_render(vc->video_mixer, NULL, output_surface, output_rect, - bv[dp].mpi, video_rect); + struct mp_image *mpi = bv[dp].mpi; + struct mp_vdpau_mixer_frame *frame = mp_vdpau_mixed_frame_get(mpi); + struct mp_vdpau_mixer_opts opts = {0}; + if (frame) + opts = frame->opts; + + // Apply custom vo_vdpau suboptions. + opts.chroma_deint |= vc->chroma_deint; + opts.pullup |= vc->pullup; + opts.denoise = MPCLAMP(opts.denoise + vc->denoise, 0, 1); + opts.sharpen = MPCLAMP(opts.sharpen + vc->sharpen, -1, 1); + if (vc->hqscaling) + opts.hqscaling = vc->hqscaling; + + mp_vdpau_mixer_render(vc->video_mixer, &opts, output_surface, output_rect, + mpi, video_rect); return 0; } -- cgit v1.2.3