summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-20 14:33:53 +0100
committerwm4 <wm4@nowhere>2015-01-20 14:33:53 +0100
commit6f5e5e6a9e9f1534282bdf21110bab980cc22164 (patch)
treea16191dc04544e8722bf816c4f80998908c2a1b9
parentbe02ebfcbae4f6f8f9f06f07363e1f651397894d (diff)
downloadmpv-6f5e5e6a9e9f1534282bdf21110bab980cc22164.tar.bz2
mpv-6f5e5e6a9e9f1534282bdf21110bab980cc22164.tar.xz
vo_opengl: remove cscale-down suboption
For an explanation see the additions to the manpage.
-rw-r--r--DOCS/man/vo.rst12
-rw-r--r--video/out/gl_video.c10
-rw-r--r--video/out/gl_video.h2
3 files changed, 15 insertions, 9 deletions
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst
index bbca84ecdb..91452c0d57 100644
--- a/DOCS/man/vo.rst
+++ b/DOCS/man/vo.rst
@@ -446,10 +446,16 @@ Available video output drivers are:
RGB. If chroma is not subsampled, this option is ignored, and the
luma scaler is used instead. Setting this option is often useless.
- ``lscale-down=<filter>``, ``cscale-down=<filter>``
- Like ``lscale`` and ``cscale``, but apply these filters on downscaling
+ ``lscale-down=<filter>`
+ Like ``lscale``, but apply these filters on downscaling
instead. If these options are unset, the filter implied by ``lscale``
- (and ``cscale``, respectively) will be applied.
+ will be applied.
+
+ There used to be a ``cscale-down`` option. This was removed, because
+ chroma scaling is usually only used for upscaling. The only case where
+ this was actually used for downscaling was when the video was scaled
+ down by more than twice (or other factors, depending on image formats),
+ and ``lscale`` did not use a separable scaler.
``cparam1``, ``cparam2``, ``cradius``
Set filter parameters and radius for ``cscale``.
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 8f4f7e8cbd..e991c85857 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -361,8 +361,7 @@ const struct m_sub_options gl_video_conf = {
OPT_FLAG("pbo", pbo, 0),
OPT_STRING_VALIDATE("lscale", scalers[0], 0, validate_scaler_opt),
OPT_STRING_VALIDATE("cscale", scalers[1], 0, validate_scaler_opt),
- OPT_STRING_VALIDATE("lscale-down", dscalers[0], 0, validate_scaler_opt),
- OPT_STRING_VALIDATE("cscale-down", dscalers[1], 0, validate_scaler_opt),
+ OPT_STRING_VALIDATE("lscale-down", dscaler, 0, validate_scaler_opt),
OPT_FLOAT("lparam1", scaler_params[0][0], 0),
OPT_FLOAT("lparam2", scaler_params[0][1], 0),
OPT_FLOAT("cparam1", scaler_params[1][0], 0),
@@ -407,6 +406,7 @@ const struct m_sub_options gl_video_conf = {
OPT_COLOR("background", background, 0),
OPT_REMOVED("approx-gamma", "this is always enabled now"),
+ OPT_REMOVED("cscale-down", "use 'indirect' and lscale-down"),
{0}
},
.size = sizeof(struct gl_video_opts),
@@ -1435,8 +1435,8 @@ static const char *expected_scaler(struct gl_video *p, int unit)
{
return "bilinear";
}
- if (p->opts.dscalers[unit] && get_scale_factor(p) < 1.0)
- return p->opts.dscalers[unit];
+ if (unit == 0 && p->opts.dscaler && get_scale_factor(p) < 1.0)
+ return p->opts.dscaler;
return p->opts.scalers[unit];
}
@@ -2609,7 +2609,7 @@ void gl_video_set_options(struct gl_video *p, struct gl_video_opts *opts)
p->opts = *opts;
for (int n = 0; n < 2; n++) {
p->opts.scalers[n] = (char *)handle_scaler_opt(p->opts.scalers[n]);
- p->opts.dscalers[n] = (char *)handle_scaler_opt(p->opts.dscalers[n]);
+ p->opts.dscaler = (char *)handle_scaler_opt(p->opts.dscaler);
}
if (!p->opts.gamma && p->video_eq.values[MP_CSP_EQ_GAMMA] != 0)
diff --git a/video/out/gl_video.h b/video/out/gl_video.h
index 37c819ecdb..b3c5d5abe5 100644
--- a/video/out/gl_video.h
+++ b/video/out/gl_video.h
@@ -30,7 +30,7 @@ struct lut3d {
struct gl_video_opts {
char *scalers[2];
- char *dscalers[2];
+ char *dscaler;
float scaler_params[2][2];
float scaler_radius[2];
int indirect;