diff options
author | wm4 <wm4@nowhere> | 2014-04-29 15:14:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-02 01:08:04 +0200 |
commit | ffbf6037cb4a3e23f467f389186b06ebea9e57da (patch) | |
tree | 6cc281f672b48bd25283e04da7fd52aa926eeea9 /video/out/vo_vdpau.c | |
parent | fd63f2f0377f30fb66ee8e78d36dffeb9c4a549a (diff) | |
download | mpv-ffbf6037cb4a3e23f467f389186b06ebea9e57da.tar.bz2 mpv-ffbf6037cb4a3e23f467f389186b06ebea9e57da.tar.xz |
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.
Diffstat (limited to 'video/out/vo_vdpau.c')
-rw-r--r-- | video/out/vo_vdpau.c | 18 |
1 files changed, 16 insertions, 2 deletions
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; } |