Before this, we made deinterlacing dependent on the video codec metadata (AVFrame.interlaced_frame for libavcodec). So even if --deinterlace=yes was set, we skipped deinterlacing if the flag wasn't set. This is very unreliable and there are many streams with flags incorrectly set. The potential problem is that this might upset people who alwase enabled deinterlace and hoped it worked. But it's likely these people were screwed by this setting anyway. The new behavior is less tricky and easier to understand, and this preferable. Maybe one day we could introduce a --deinterlace=auto, which does the right thing, but of course this would be hard to implement (esecially with hwdec). Fixes #5219.
Unified · Split
| @@ -72,6 +72,9 @@ Interface changes · 71 unmodified lines | |||
| 72 | will probably stall. | 72 | will probably stall. |
| 73 | - deprecate the OpenGL cocoa backend, option choice --gpu-context=cocoa | 73 | - deprecate the OpenGL cocoa backend, option choice --gpu-context=cocoa |
| 74 | when used with --gpu-api=opengl (use --vo=opengl-cb) | 74 | when used with --gpu-api=opengl (use --vo=opengl-cb) |
| 75 | - make --deinterlace=yes always deinterlace, instead of trying to check | ||
| 76 | certain unreliable video metadata. Also flip the defaults of all builtin | ||
| 77 | HW deinterlace filters to always deinterlace. | ||
| 75 | --- mpv 0.28.0 --- | 78 | --- mpv 0.28.0 --- |
| 76 | - rename --hwdec=mediacodec option to mediacodec-copy, to reflect | 79 | - rename --hwdec=mediacodec option to mediacodec-copy, to reflect |
| 77 | conventions followed by other hardware video decoding APIs | 80 | conventions followed by other hardware video decoding APIs |
| @@ -1036,6 +1036,8 @@ Video · 1035 unmodified lines | |||
| 1036 | ``--deinterlace=auto`` was removed, which used to mean that the default | 1036 | ``--deinterlace=auto`` was removed, which used to mean that the default |
| 1037 | interlacing option of possibly inserted video filters was used.) | 1037 | interlacing option of possibly inserted video filters was used.) |
| 1038 | 1038 | ||
| 1039 | Note that this will make video look worse if it's not actually interlaced. | ||
| 1040 | |||
| 1039 | ``--frames=<number>`` | 1041 | ``--frames=<number>`` |
| 1040 | Play/convert only first ``<number>`` video frames, then quit. | 1042 | Play/convert only first ``<number>`` video frames, then quit. |
| 1041 | 1043 | ||
| @@ -488,8 +488,8 @@ Available mpv-only filters are: · 487 unmodified lines | |||
| 488 | mpv bugs. | 488 | mpv bugs. |
| 489 | 489 | ||
| 490 | ``<interlaced-only>`` | 490 | ``<interlaced-only>`` |
| 491 | :no: Deinterlace all frames. | 491 | :no: Deinterlace all frames (default). |
| 492 | :yes: Only deinterlace frames marked as interlaced (default). | 492 | :yes: Only deinterlace frames marked as interlaced. |
| 493 | 493 | ||
| 494 | ``reversal-bug=<yes|no>`` | 494 | ``reversal-bug=<yes|no>`` |
| 495 | :no: Use the API as it was interpreted by older Mesa drivers. While | 495 | :no: Use the API as it was interpreted by older Mesa drivers. While |
| @@ -544,7 +544,7 @@ Available mpv-only filters are: · 48 unmodified lines | |||
| 544 | Try to apply inverse telecine, needs motion adaptive temporal | 544 | Try to apply inverse telecine, needs motion adaptive temporal |
| 545 | deinterlacing. | 545 | deinterlacing. |
| 546 | ``interlaced-only=<yes|no>`` | 546 | ``interlaced-only=<yes|no>`` |
| 547 | If ``yes`` (default), only deinterlace frames marked as interlaced. | 547 | If ``yes``, only deinterlace frames marked as interlaced (default: no). |
| 548 | ``hqscaling=<0-9>`` | 548 | ``hqscaling=<0-9>`` |
| 549 | 0 | 549 | 0 |
| 550 | Use default VDPAU scaling (default). | 550 | Use default VDPAU scaling (default). |
| @@ -558,7 +558,7 @@ Available mpv-only filters are: · 7 unmodified lines | |||
| 558 | ``deint=<yes|no>`` | 558 | ``deint=<yes|no>`` |
| 559 | Whether deinterlacing is enabled (default: no). | 559 | Whether deinterlacing is enabled (default: no). |
| 560 | ``interlaced-only=<yes|no>`` | 560 | ``interlaced-only=<yes|no>`` |
| 561 | If ``yes`` (default), only deinterlace frames marked as interlaced. | 561 | If ``yes``, only deinterlace frames marked as interlaced (default: no). |
| 562 | ``mode=<blend|bob|adaptive|mocomp|ivctc|none>`` | 562 | ``mode=<blend|bob|adaptive|mocomp|ivctc|none>`` |
| 563 | Tries to select a video processor with the given processing capability. | 563 | Tries to select a video processor with the given processing capability. |
| 564 | If a video processor supports multiple capabilities, it is not clear | 564 | If a video processor supports multiple capabilities, it is not clear |
| @@ -76,7 +76,7 @@ static void deint_process(struct mp_filter *f) · 75 unmodified lines | |||
| 76 | p->sub.filter = | 76 | p->sub.filter = |
| 77 | mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "d3d11vpp", NULL); | 77 | mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "d3d11vpp", NULL); |
| 78 | } else if (mp_sws_supports_input(img->imgfmt)) { | 78 | } else if (mp_sws_supports_input(img->imgfmt)) { |
| 79 | char *args[] = {"mode", "send_field", "deint", "interlaced", NULL}; | 79 | char *args[] = {"mode", "send_field", NULL}; |
| 80 | p->sub.filter = | 80 | p->sub.filter = |
| 81 | mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "yadif", args); | 81 | mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "yadif", args); |
| 82 | } else { | 82 | } else { |
| @@ -532,7 +532,7 @@ const struct mp_user_filter_entry vf_d3d11vpp = { · 531 unmodified lines | |||
| 532 | .priv_size = sizeof(OPT_BASE_STRUCT), | 532 | .priv_size = sizeof(OPT_BASE_STRUCT), |
| 533 | .priv_defaults = &(const OPT_BASE_STRUCT) { | 533 | .priv_defaults = &(const OPT_BASE_STRUCT) { |
| 534 | .deint_enabled = 1, | 534 | .deint_enabled = 1, |
| 535 | .interlaced_only = 1, | 535 | .interlaced_only = 0, |
| 536 | .mode = D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB, | 536 | .mode = D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB, |
| 537 | }, | 537 | }, |
| 538 | .options = vf_opts_fields, | 538 | .options = vf_opts_fields, |
| @@ -475,7 +475,7 @@ const struct mp_user_filter_entry vf_vavpp = { · 474 unmodified lines | |||
| 475 | .priv_size = sizeof(OPT_BASE_STRUCT), | 475 | .priv_size = sizeof(OPT_BASE_STRUCT), |
| 476 | .priv_defaults = &(const OPT_BASE_STRUCT){ | 476 | .priv_defaults = &(const OPT_BASE_STRUCT){ |
| 477 | .deint_type = 2, | 477 | .deint_type = 2, |
| 478 | .interlaced_only = 1, | 478 | .interlaced_only = 0, |
| 479 | .reversal_bug = 1, | 479 | .reversal_bug = 1, |
| 480 | }, | 480 | }, |
| 481 | .options = vf_opts_fields, | 481 | .options = vf_opts_fields, |
| @@ -180,7 +180,7 @@ static const m_option_t vf_opts_fields[] = { · 179 unmodified lines | |||
| 180 | OPT_FLOATRANGE("denoise", opts.denoise, 0, 0, 1), | 180 | OPT_FLOATRANGE("denoise", opts.denoise, 0, 0, 1), |
| 181 | OPT_FLOATRANGE("sharpen", opts.sharpen, 0, -1, 1), | 181 | OPT_FLOATRANGE("sharpen", opts.sharpen, 0, -1, 1), |
| 182 | OPT_INTRANGE("hqscaling", opts.hqscaling, 0, 0, 9), | 182 | OPT_INTRANGE("hqscaling", opts.hqscaling, 0, 0, 9), |
| 183 | OPT_FLAG("interlaced-only", interlaced_only, 0, OPTDEF_INT(1)), | 183 | OPT_FLAG("interlaced-only", interlaced_only, 0), |
| 184 | {0} | 184 | {0} |
| 185 | }; | 185 | }; |
| 186 | 186 | ||