Unified · Split
| @@ -691,6 +691,13 @@ Available mpv-only filters are: · 690 unmodified lines | ||
| 691 | 691 | with hardware decoding. Software frames are automatically uploaded to hardware |
| 692 | 692 | for processing. |
| 693 | 693 | |
| 694 | + ``format`` | |
| 695 | + Convert to the selected image format, e.g., nv12, p010, etc. (default: don't change). | |
| 696 | + Format names can be queried with ``--vf=d3d11vpp=format=help``. | |
| 697 | + Note that only a limited subset is supported, and actual support depends | |
| 698 | + on your hardware. Normally, this shouldn't be changed unless some | |
| 699 | + processing only works with a specific format, in which case it can be | |
| 700 | + selected here. | |
| 694 | 701 | ``deint=<yes|no>`` |
| 695 | 702 | Whether deinterlacing is enabled (default: no). |
| 696 | 703 | ``scale`` |
| @@ -79,6 +79,7 @@ struct opts { · 78 unmodified lines | ||
| 79 | 79 | bool interlaced_only; |
| 80 | 80 | int mode; |
| 81 | 81 | int field_parity; |
| 82 | + int format; | |
| 82 | 83 | }; |
| 83 | 84 | |
| 84 | 85 | struct priv { |
| @@ -467,6 +468,9 @@ static void vf_d3d11vpp_process(struct mp_filter *vf) · 382 unmodified lines | ||
| 467 | 468 | p->out_params.crop.y0 = lrintf(p->opts->scale * p->out_params.crop.y0); |
| 468 | 469 | p->out_params.crop.y1 = lrintf(p->opts->scale * p->out_params.crop.y1); |
| 469 | 470 | |
| 471 | + if (p->opts->format) | |
| 472 | + p->out_params.hw_subfmt = p->opts->format; | |
| 473 | + | |
| 470 | 474 | p->require_filtering = p->params.hw_subfmt != p->out_params.hw_subfmt || |
| 471 | 475 | p->params.w != p->out_params.w || |
| 472 | 476 | p->params.h != p->out_params.h; |
| @@ -599,6 +603,7 @@ fail: · 126 unmodified lines | ||
| 599 | 603 | |
| 600 | 604 | #define OPT_BASE_STRUCT struct opts |
| 601 | 605 | static const m_option_t vf_opts_fields[] = { |
| 606 | + {"format", OPT_IMAGEFORMAT(format)}, | |
| 602 | 607 | {"deint", OPT_BOOL(deint_enabled)}, |
| 603 | 608 | {"scale", OPT_FLOAT(scale)}, |
| 604 | 609 | {"scaling-mode", OPT_CHOICE(scaling_mode, |