summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-29 19:50:04 +0100
committerwm4 <wm4@nowhere>2017-11-29 21:30:51 +0100
commit03518c1a836fd8871d76c735c3a4842ce0416902 (patch)
treed463c40721a21b5b38b11e74b9d7715d69c495ad
parent9d6bc77a599626246e44834a1eb69db81637c6fa (diff)
downloadmpv-03518c1a836fd8871d76c735c3a4842ce0416902.tar.bz2
mpv-03518c1a836fd8871d76c735c3a4842ce0416902.tar.xz
video: fix rotation and deinterlace auto filters
Now using libavfilter filters directly. The rotation case is a bit lazy, because it uses the slow vf_rotate filter in all cases, instead of using special filters for 90° step rotations.
-rw-r--r--Copyright4
-rw-r--r--player/video.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/Copyright b/Copyright
index a1664aee99..fc918c4be6 100644
--- a/Copyright
+++ b/Copyright
@@ -38,9 +38,7 @@ them quite central:
correction, fine control about downmix/upmix/resampling behavior
- Linux X11 video output
- BSD audio output via OSS
-- NVIDIA/Linux hardware decoding (vdpau, although CUDA usually works)
-- many builtin video filters (use libavfilter instead)
-- automatic rotation and stereoscopic video handling
+- NVIDIA/Linux hardware decoding (vdpau, although nvdec usually works)
- Linux TV input
- minor features: jack, DVD, CDDA, SMB, CACA, legacy direct3d VO
Some of these will be fixed in the future. The intended use for LGPL mode is
diff --git a/player/video.c b/player/video.c
index 9d69ec291f..8fe3244c5c 100644
--- a/player/video.c
+++ b/player/video.c
@@ -116,7 +116,7 @@ static int probe_deint_filters(struct vo_chain *vo_c)
if (check_output_format(vo_c, IMGFMT_D3D11VA) ||
check_output_format(vo_c, IMGFMT_D3D11NV12))
return try_filter(vo_c, "d3d11vpp", VF_DEINTERLACE_LABEL, NULL);
- char *args[] = {"warn", "no", NULL};
+ char *args[] = {"mode", "send_field", "deint", "interlaced", NULL};
return try_filter(vo_c, "yadif", VF_DEINTERLACE_LABEL, args);
}
@@ -144,7 +144,11 @@ static void filter_reconfig(struct MPContext *mpctx, struct vo_chain *vo_c)
if (params.rotate) {
if (!(vo_c->vo->driver->caps & VO_CAP_ROTATE90) || params.rotate % 90) {
// Try to insert a rotation filter.
- char *args[] = {"angle", "auto", "warn", "no", NULL};
+ double angle = params.rotate / 360.0 * M_PI * 2;
+ char *args[] = {"angle", mp_tprintf(30, "%f", angle),
+ "ow", mp_tprintf(30, "rotw(%f)", angle),
+ "oh", mp_tprintf(30, "roth(%f)", angle),
+ NULL};
if (try_filter(vo_c, "rotate", "autorotate", args) < 0)
MP_ERR(vo_c, "Can't insert rotation filter.\n");
}