summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/vo.rst29
-rw-r--r--libvo/video_out.c6
-rw-r--r--libvo/vo_opengl.c32
3 files changed, 50 insertions, 17 deletions
diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst
index 93fc480977..32c6077cb3 100644
--- a/DOCS/man/en/vo.rst
+++ b/DOCS/man/en/vo.rst
@@ -228,14 +228,13 @@ corevideo (Mac OS X 10.6 and later)
for vo_opengl_).
.. _vo_opengl:
-opengl
- OpenGL video output driver.
- It supports extended scaling methods, dithering and color management.
- It tries to use sane defaults for good quality output.
+opengl
+ OpenGL video output driver. It supports extended scaling methods, dithering
+ and color management.
- Note that some cheaper LCDs do dithering that gravely interferes with
- vo_opengl's dithering. Disabling dithering with ``dither-depth=-1`` helps.
+ By default, it tries to use fast and fail-safe settings. Use the driver
+ ``opengl-hq`` to use this driver with a high quality rendering preset.
Requires at least OpenGL 2.1 and the GL_ARB_texture_rg extension. For older
drivers, ``opengl-old`` may work.
@@ -375,10 +374,9 @@ opengl
RGB. If chroma is not subsampled, this option is ignored, and the
luma scaler is used instead. Setting this option is often useless.
- no-fancy-downscaling
- When using convolution based filters, don't extend the filter
- size when downscaling. Trades downscaling performance for
- reduced quality.
+ fancy-downscaling
+ When using convolution based filters, extend the filter size
+ when downscaling. Trades quality for reduced downscaling performance.
no-npot
Force use of power-of-2 texture sizes. For debugging only.
@@ -443,6 +441,17 @@ opengl
dimension. Default is 128x256x64.
Sizes must be a power of two, and 256 at most.
+opengl-hq
+ Same as ``opengl``, but with default settings for high quality rendering.
+
+ This is equivalent to:
+
+ | --vo=opengl:lscale=lanczos2:fancy-downscaling:dither-depth=0
+
+ Note that some cheaper LCDs do dithering that gravely interferes with
+ vo_opengl's dithering. Disabling dithering with ``dither-depth=-1`` helps.
+
+
opengl-old
OpenGL video output driver, old version. Video size must be smaller
than the maximum texture size of your OpenGL implementation. Intended to
diff --git a/libvo/video_out.c b/libvo/video_out.c
index a51e46eea0..41d2250c3b 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -75,6 +75,7 @@ extern struct vo_driver video_out_x11;
extern struct vo_driver video_out_vdpau;
extern struct vo_driver video_out_xv;
extern struct vo_driver video_out_opengl;
+extern struct vo_driver video_out_opengl_hq;
extern struct vo_driver video_out_opengl_old;
extern struct vo_driver video_out_null;
extern struct vo_driver video_out_image;
@@ -121,6 +122,9 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_ENCODING
&video_out_lavc,
#endif
+#ifdef CONFIG_GL
+ &video_out_opengl_hq,
+#endif
NULL
};
@@ -287,7 +291,7 @@ static void replace_legacy_vo_name(bstr *name)
if (bstr_equals0(*name, "gl"))
new = bstr0("opengl");
if (bstr_equals0(*name, "gl3"))
- new = bstr0("opengl");
+ new = bstr0("opengl-hq");
if (!bstr_equals(*name, new)) {
mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "VO driver '%.*s' has been replaced "
"with '%.*s'!\n", BSTR_P(*name), BSTR_P(new));
diff --git a/libvo/vo_opengl.c b/libvo/vo_opengl.c
index a46f60c171..111f5dcd11 100644
--- a/libvo/vo_opengl.c
+++ b/libvo/vo_opengl.c
@@ -2323,6 +2323,8 @@ static int preinit(struct vo *vo, const char *arg)
struct gl_priv *p = talloc_zero(vo, struct gl_priv);
vo->priv = p;
+ bool hq = strcmp(vo->driver->info->short_name, "opengl-hq") == 0;
+
*p = (struct gl_priv) {
.vo = vo,
.colorspace = MP_CSP_DETAILS_DEFAULTS,
@@ -2330,11 +2332,12 @@ static int preinit(struct vo *vo, const char *arg)
.use_pbo = 0,
.swap_interval = vo_vsync,
.osd_color = 0xffffff,
+ .dither_depth = hq ? 0 : -1,
.fbo_format = GL_RGB16,
.use_scale_sep = 1,
- .use_fancy_downscaling = 1,
+ .use_fancy_downscaling = hq,
.scalers = {
- { .index = 0, .name = "lanczos2" },
+ { .index = 0, .name = hq ? "lanczos2" : "bilinear" },
{ .index = 1, .name = "bilinear" },
},
.scaler_params = {NAN, NAN},
@@ -2459,6 +2462,24 @@ const struct vo_driver video_out_opengl = {
.uninit = uninit,
};
+const struct vo_driver video_out_opengl_hq = {
+ .is_new = true,
+ .info = &(const vo_info_t) {
+ "Extended OpenGL Renderer (high quality rendering preset)",
+ "opengl-hq",
+ "Based on vo_gl.c by Reimar Doeffinger",
+ ""
+ },
+ .preinit = preinit,
+ .config = config,
+ .control = control,
+ .draw_slice = draw_slice,
+ .draw_osd = draw_osd,
+ .flip_page = flip_page,
+ .check_events = check_events,
+ .uninit = uninit,
+};
+
static const char help_text[] =
"\n--vo=opengl command line help:\n"
"Example: mplayer --vo=opengl:scale-sep:lscale=lanczos2\n"
@@ -2528,10 +2549,9 @@ static const char help_text[] =
" Note that with some scaling filters, upscaling is always done in\n"
" RGB. If chroma is not subsampled, this option is ignored, and the\n"
" luma scaler is used instead. Setting this option is often useless.\n"
-" no-fancy-downscaling\n"
-" When using convolution based filters, don't extend the filter\n"
-" size when downscaling. Trades downscaling performance for\n"
-" reduced quality.\n"
+" fancy-downscaling\n"
+" When using convolution based filters, extend the filter size\n"
+" when downscaling. Trades quality for reduced downscaling performance.\n"
" no-npot\n"
" Force use of power-of-2 texture sizes. For debugging only.\n"
" Borders will look discolored due to filtering.\n"