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.
This commit is contained in:
wm4 2014-04-29 15:14:19 +02:00
parent fd63f2f037
commit ffbf6037cb
1 changed files with 16 additions and 2 deletions

View File

@ -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;
}