History

vf_d3d11vpp: add output format selection

Kacper Michajłow committed 2 years ago

Commit c2997aa1 parent c4d85fc2 files · +12 −0Browse files

Unified · Split

2 files
  1. DOCS/man/vf.rst +7 −0
  2. video/filter/vf_d3d11vpp.c +5 −0
DOCS/man/vf.rst+7−0
@@ -691,6 +691,13 @@ Available mpv-only filters are: · 690 unmodified lines
691 with hardware decoding. Software frames are automatically uploaded to hardware691 with hardware decoding. Software frames are automatically uploaded to hardware
692 for processing.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 ``deint=<yes|no>``701 ``deint=<yes|no>``
695 Whether deinterlacing is enabled (default: no).702 Whether deinterlacing is enabled (default: no).
696 ``scale``703 ``scale``
video/filter/vf_d3d11vpp.c+5−0
@@ -79,6 +79,7 @@ struct opts { · 78 unmodified lines
79 bool interlaced_only;79 bool interlaced_only;
80 int mode;80 int mode;
81 int field_parity;81 int field_parity;
82 int format;
82};83};
83 84
84struct priv {85struct priv {
@@ -467,6 +468,9 @@ static void vf_d3d11vpp_process(struct mp_filter *vf) · 382 unmodified lines
467 p->out_params.crop.y0 = lrintf(p->opts->scale * p->out_params.crop.y0);468 p->out_params.crop.y0 = lrintf(p->opts->scale * p->out_params.crop.y0);
468 p->out_params.crop.y1 = lrintf(p->opts->scale * p->out_params.crop.y1);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 p->require_filtering = p->params.hw_subfmt != p->out_params.hw_subfmt ||474 p->require_filtering = p->params.hw_subfmt != p->out_params.hw_subfmt ||
471 p->params.w != p->out_params.w ||475 p->params.w != p->out_params.w ||
472 p->params.h != p->out_params.h;476 p->params.h != p->out_params.h;
@@ -599,6 +603,7 @@ fail: · 126 unmodified lines
599 603
600#define OPT_BASE_STRUCT struct opts604#define OPT_BASE_STRUCT struct opts
601static const m_option_t vf_opts_fields[] = {605static const m_option_t vf_opts_fields[] = {
606 {"format", OPT_IMAGEFORMAT(format)},
602 {"deint", OPT_BOOL(deint_enabled)},607 {"deint", OPT_BOOL(deint_enabled)},
603 {"scale", OPT_FLOAT(scale)},608 {"scale", OPT_FLOAT(scale)},
604 {"scaling-mode", OPT_CHOICE(scaling_mode,609 {"scaling-mode", OPT_CHOICE(scaling_mode,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t