diff options
author | wm4 <wm4@nowhere> | 2012-09-29 18:36:05 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-03 03:17:53 +0200 |
commit | 47d15a5b6bfea3a17cd33605b8f5f2aebf3cc681 (patch) | |
tree | b816f1830ccd4a194064c87d6c8c51383c1bf95c /libvo/vo_opengl.c | |
parent | 3cbce1eb073670818cf9cfa0b987229e5d499aac (diff) | |
download | mpv-47d15a5b6bfea3a17cd33605b8f5f2aebf3cc681.tar.bz2 mpv-47d15a5b6bfea3a17cd33605b8f5f2aebf3cc681.tar.xz |
vo_opengl: use low quality default settings, add opengl-hq alias
Change the default settings for vo_opengl to highest performance and
compatibility, but lowest quality. Use bilinear as default scaler.
Add "opengl-hq" as alias for high quality settings. This alias uses
exactly the same settings as vo_opengl did before this commit.
Diffstat (limited to 'libvo/vo_opengl.c')
-rw-r--r-- | libvo/vo_opengl.c | 32 |
1 files changed, 26 insertions, 6 deletions
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" |