1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 05:15:12 +00:00

vo_opengl: fix deband sub-option handling

This all has to be done manually.
This commit is contained in:
wm4 2015-09-09 20:40:04 +02:00
parent 97363e176d
commit b4abcbd19d

View File

@ -32,6 +32,7 @@
#include "video.h" #include "video.h"
#include "misc/bstr.h" #include "misc/bstr.h"
#include "options/m_config.h"
#include "common.h" #include "common.h"
#include "utils.h" #include "utils.h"
#include "hwdec.h" #include "hwdec.h"
@ -2039,7 +2040,6 @@ static void check_gl_features(struct gl_video *p)
MP_WARN(p, "Disabling PBOs (GLES unsupported).\n"); MP_WARN(p, "Disabling PBOs (GLES unsupported).\n");
} }
//
if (p->opts.dumb_mode || gl->es || !have_fbo || !test_fbo(p)) { if (p->opts.dumb_mode || gl->es || !have_fbo || !test_fbo(p)) {
if (!p->opts.dumb_mode) { if (!p->opts.dumb_mode) {
MP_WARN(p, "High bit depth FBOs unsupported. Enabling dumb mode.\n" MP_WARN(p, "High bit depth FBOs unsupported. Enabling dumb mode.\n"
@ -2060,6 +2060,7 @@ static void check_gl_features(struct gl_video *p)
.dumb_mode = 1, .dumb_mode = 1,
}; };
assign_options(&p->opts, &new_opts); assign_options(&p->opts, &new_opts);
p->opts.deband_opts = m_config_alloc_struct(NULL, &deband_conf);
return; return;
} }
@ -2434,9 +2435,13 @@ static void assign_options(struct gl_video_opts *dst, struct gl_video_opts *src)
talloc_free(dst->scale_shader); talloc_free(dst->scale_shader);
talloc_free(dst->pre_shaders); talloc_free(dst->pre_shaders);
talloc_free(dst->post_shaders); talloc_free(dst->post_shaders);
talloc_free(dst->deband_opts);
*dst = *src; *dst = *src;
if (src->deband_opts)
dst->deband_opts = m_sub_options_copy(NULL, &deband_conf, src->deband_opts);
for (int n = 0; n < 4; n++) { for (int n = 0; n < 4; n++) {
dst->scaler[n].kernel.name = dst->scaler[n].kernel.name =
(char *)handle_scaler_opt(dst->scaler[n].kernel.name, n == 3); (char *)handle_scaler_opt(dst->scaler[n].kernel.name, n == 3);