diff options
author | wm4 <wm4@nowhere> | 2015-07-08 13:40:06 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-08 14:48:11 +0200 |
commit | 4781f9e69a074ded4404784138bccc231906b492 (patch) | |
tree | 257e1edf7685d455263d21b229b7800b367f6044 | |
parent | 9620e37d6a7e34f86bde7886f9c0b1e564576a68 (diff) | |
download | mpv-4781f9e69a074ded4404784138bccc231906b492.tar.bz2 mpv-4781f9e69a074ded4404784138bccc231906b492.tar.xz |
vf_vavpp: don't attempt to deinterlace progressive frames
-rw-r--r-- | DOCS/interface-changes.rst | 1 | ||||
-rw-r--r-- | DOCS/man/vf.rst | 4 | ||||
-rw-r--r-- | video/filter/vf_vavpp.c | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 48e25fb7b2..47ad7b5ae9 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -20,6 +20,7 @@ Interface changes :: --- mpv 0.10.0 will be released --- + - add vf yadif/vavpp interlaced-only suboptions - add --hwdec-preload - add ao coreaudio exclusive suboption - add ``track-list/N/forced`` property diff --git a/DOCS/man/vf.rst b/DOCS/man/vf.rst index 991dd64eca..0b2cf8154d 100644 --- a/DOCS/man/vf.rst +++ b/DOCS/man/vf.rst @@ -822,6 +822,10 @@ Available filters are: depends on the GPU hardware, the GPU drivers, driver bugs, and mpv bugs. + ``<interlaced-only>`` + :no: Deinterlace all frames. + :yes: Only deinterlace frames marked as interlaced (default). + ``vdpaupp`` VDPAU video post processing. Works with ``--vo=vdpau`` and ``--vo=opengl`` only. This filter is automatically inserted if deinterlacing is requested 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} }; |