diff options
author | Niklas Haas <git@nand.wakku.to> | 2015-03-27 06:18:32 +0100 |
---|---|---|
committer | Niklas Haas <git@nand.wakku.to> | 2015-04-04 15:36:14 +0200 |
commit | 34caa8b01cf9ab9050554be7cd96218c213cb3b8 (patch) | |
tree | a59480eed8e45b87ef0d2b3a6441f1c61e6c1885 | |
parent | 6bd673c1d29e3214de41c88d1aae15cc7f9fa432 (diff) | |
download | mpv-34caa8b01cf9ab9050554be7cd96218c213cb3b8.tar.bz2 mpv-34caa8b01cf9ab9050554be7cd96218c213cb3b8.tar.xz |
vo_opengl: add scale-wparam option
This lets us tune the window parameter
-rw-r--r-- | DOCS/man/vo.rst | 13 | ||||
-rw-r--r-- | video/out/gl_video.c | 20 |
2 files changed, 25 insertions, 8 deletions
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index 2e07b55530..f061609a5f 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -396,6 +396,19 @@ Available video output drivers are: Defaults to the filter's preferred window if unset. Use ``scale-window=help`` to get a list of supported windowing functions. + ``scale-wparam=<window>`` + (Advanced users only) Configure the parameter for the window function + given by ``scale-window``. Ignored if the window is not tunable. + Currently, this affects the following window parameters: + + kaiser + Window parameter (alpha). Defaults to 6.33. + blackman + Window parameter (alpha). Defaults to 0.16. + gaussian + Scale parameter (t). Increasing this makes the window wider. + Defaults to 1. + ``scaler-resizes-only`` Disable the scaler if the video image is not resized. In that case, ``bilinear`` is used instead whatever is set with ``scale``. Bilinear diff --git a/video/out/gl_video.c b/video/out/gl_video.c index a087adeee0..d0f2d99337 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -324,10 +324,10 @@ const struct gl_video_opts gl_video_opts_def = { .sigmoid_center = 0.75, .sigmoid_slope = 6.5, .scaler = { - {{"bilinear", .params={NAN, NAN}}}, // scale - {{NULL, .params={NAN, NAN}}}, // dscale (defaults to scale) - {{"bilinear", .params={NAN, NAN}}}, // cscale - {{"oversample", .params={NAN, NAN}}} // tscale + {{"bilinear", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // scale + {{NULL, .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // dscale + {{"bilinear", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // cscale + {{"oversample", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // tscale }, .alpha_mode = 2, .background = {0, 0, 0, 255}, @@ -344,10 +344,10 @@ const struct gl_video_opts gl_video_opts_hq_def = { .sigmoid_slope = 6.5, .sigmoid_upscaling = 1, .scaler = { - {{"spline36", .params={NAN, NAN}}}, // scale - {{"mitchell", .params={NAN, NAN}}}, // dscale - {{"spline36", .params={NAN, NAN}}}, // cscale - {{"oversample", .params={NAN, NAN}}} // tscale + {{"spline36", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // scale + {{"mitchell", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // dscale + {{"spline36", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // cscale + {{"oversample", .params={NAN, NAN}}, {.params = {NAN, NAN}}}, // tscale }, .alpha_mode = 2, .background = {0, 0, 0, 255}, @@ -401,6 +401,10 @@ const struct m_sub_options gl_video_conf = { OPT_STRING_VALIDATE("dscale-window", scaler[1].window.name, 0, validate_window_opt), OPT_STRING_VALIDATE("cscale-window", scaler[2].window.name, 0, validate_window_opt), OPT_STRING_VALIDATE("tscale-window", scaler[3].window.name, 0, validate_window_opt), + OPT_FLOAT("scale-wparam", scaler[0].window.params[0], 0), + OPT_FLOAT("dscale-wparam", scaler[1].window.params[0], 0), + OPT_FLOAT("cscale-wparam", scaler[2].window.params[0], 0), + OPT_FLOAT("tscale-wparam", scaler[3].window.params[0], 0), OPT_FLOATRANGE("scale-radius", scaler[0].radius, 0, 0.5, 16.0), OPT_FLOATRANGE("dscale-radius", scaler[1].radius, 0, 0.5, 16.0), OPT_FLOATRANGE("cscale-radius", scaler[2].radius, 0, 0.5, 16.0), |