summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-08 13:40:06 +0200
committerwm4 <wm4@nowhere>2015-07-08 14:48:11 +0200
commit4781f9e69a074ded4404784138bccc231906b492 (patch)
tree257e1edf7685d455263d21b229b7800b367f6044 /video/filter
parent9620e37d6a7e34f86bde7886f9c0b1e564576a68 (diff)
downloadmpv-4781f9e69a074ded4404784138bccc231906b492.tar.bz2
mpv-4781f9e69a074ded4404784138bccc231906b492.tar.xz
vf_vavpp: don't attempt to deinterlace progressive frames
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf_vavpp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c
index 642420a544..cb11e69cbb 100644
--- a/video/filter/vf_vavpp.c
+++ b/video/filter/vf_vavpp.c
@@ -58,6 +58,7 @@ struct pipeline {
struct vf_priv_s {
int deint_type; // 0: none, 1: discard, 2: double fps
+ int interlaced_only;
bool do_deint;
VABufferID buffers[VAProcFilterCount];
int num_buffers;
@@ -86,6 +87,7 @@ static const struct vf_priv_s vf_priv_default = {
.config = VA_INVALID_ID,
.context = VA_INVALID_ID,
.deint_type = 2,
+ .interlaced_only = 1,
};
// The array items must match with the "deint" suboption values.
@@ -254,6 +256,10 @@ static void output_frames(struct vf_instance *vf)
}
unsigned int csp = va_get_colorspace_flag(p->params.colorspace);
unsigned int field = get_deint_field(p, 0, in);
+ if (field == VA_FRAME_PICTURE && p->interlaced_only) {
+ vf_add_output_frame(vf, mp_image_new_ref(in));
+ return;
+ }
struct mp_image *out1 = render(vf, in, field | csp);
if (!out1) { // cannot render
vf_add_output_frame(vf, mp_image_new_ref(in));
@@ -497,6 +503,7 @@ static const m_option_t vf_opts_fields[] = {
{"weave", 3},
{"motion-adaptive", 4},
{"motion-compensated", 5})),
+ OPT_FLAG("interlaced-only", interlaced_only, 0),
{0}
};