summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-04 23:51:31 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-04 23:51:31 +0200
commit30445e2fa4cc9f1d018ae06a81c50d51a72a4908 (patch)
tree7b2080e336deceed2e7eb882268130697503f520 /libvo
parent30c5994382301ad72b7fbf60687ac666d7447612 (diff)
downloadmpv-30445e2fa4cc9f1d018ae06a81c50d51a72a4908.tar.bz2
mpv-30445e2fa4cc9f1d018ae06a81c50d51a72a4908.tar.xz
vo_vdpau: allow "deint=-N" to specify mode without enabling deint
Allow negative values of the "deint" parameter and make them select the same deinterlacing mode as the corresponding positive value, but without enabling deinterlace on startup. This is useful for configuration files. Also tweak the overall manpage description of vo_vdpau a bit to make it sound less as if the VO would be for hardware acceleration only.
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_vdpau.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 01d97863b9..f8748b5574 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -635,7 +635,7 @@ static int create_vdp_mixer(struct vo *vo, VdpChromaType vdp_chroma_type)
&vdp_chroma_type,
};
features[feature_count++] = VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL;
- if (vc->deint == 4)
+ if (vc->deint_type == 4)
features[feature_count++] =
VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL;
if (vc->pullup)
@@ -669,6 +669,8 @@ static int create_vdp_mixer(struct vo *vo, VdpChromaType vdp_chroma_type)
feature_enables[i] = VDP_TRUE;
if (vc->deint < 3)
feature_enables[0] = VDP_FALSE;
+ if (vc->deint_type == 4 && vc->deint < 4)
+ feature_enables[1] = VDP_FALSE;
if (feature_count) {
vdp_st = vdp->video_mixer_set_feature_enables(vc->video_mixer,
feature_count, features,
@@ -1621,7 +1623,7 @@ static int preinit(struct vo *vo, const char *arg)
vc->flip_offset_fs = 50;
vc->num_output_surfaces = 3;
const opt_t subopts[] = {
- {"deint", OPT_ARG_INT, &vc->deint, (opt_test_f)int_non_neg},
+ {"deint", OPT_ARG_INT, &vc->deint, NULL},
{"chroma-deint", OPT_ARG_BOOL, &vc->chroma_deint, NULL},
{"pullup", OPT_ARG_BOOL, &vc->pullup, NULL},
{"denoise", OPT_ARG_FLOAT, &vc->denoise, NULL},
@@ -1655,7 +1657,9 @@ static int preinit(struct vo *vo, const char *arg)
vc->num_output_surfaces = MAX_OUTPUT_SURFACES;
}
if (vc->deint)
- vc->deint_type = vc->deint;
+ vc->deint_type = FFABS(vc->deint);
+ if (vc->deint < 0)
+ vc->deint = 0;
if (!vo_init(vo))
return -1;