mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
video: respect --deinterlace=auto
--deinterlace=auto is the default, and has the obscure semantics that deinterlacing is disabled, unless the user has manually inserted a deinterlacing filter. While in software decoding this doesn't matter, and we will happily insert 2 yadif filters (if the user has already added one), or not remove the yadif filter (if deinterlacing is disabled, but the user has added the filter manually), this is different with hardware deinterlacer filters. These support VFCTRL_SET_DEINTERLACE for toggling deinterlacing filtering at runtime. It exists mainly for legacy reasons, and possibly because it makes switching deinterlacing modes more efficient. It might also gives us an entry-point for VO deinterlacing, maybe. For whatever reasons this mechanism exists, we still support and use it. This commit fixes that video.c always used VFCTRL_SET_DEINTERLACE to disable deinterlacing, even if --deinterlace=auto was set. Fix this by checking the value of the option directly.
This commit is contained in:
parent
bf2e2bf3e8
commit
8b47e5daa4
@ -214,7 +214,8 @@ static void filter_reconfig(struct MPContext *mpctx, struct vo_chain *vo_c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make sure to reset this even if runtime deint switching is used.
|
// Make sure to reset this even if runtime deint switching is used.
|
||||||
video_vf_vo_control(vo_c, VFCTRL_SET_DEINTERLACE, &(int){0});
|
if (mpctx->opts->deinterlace >= 0)
|
||||||
|
video_vf_vo_control(vo_c, VFCTRL_SET_DEINTERLACE, &(int){0});
|
||||||
|
|
||||||
if (params.rotate && (params.rotate % 90 == 0)) {
|
if (params.rotate && (params.rotate % 90 == 0)) {
|
||||||
if (!(vo_c->vo->driver->caps & VO_CAP_ROTATE90)) {
|
if (!(vo_c->vo->driver->caps & VO_CAP_ROTATE90)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user