diff options
author | wm4 <wm4@nowhere> | 2016-10-01 12:01:57 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-10-01 12:09:18 +0200 |
commit | 052584c9e2b87a69ef2359d88989a694910ac506 (patch) | |
tree | e155a7e3fcc6a8257f2416580224a1d644438f3e /video/out | |
parent | 52fea2f909ec7fd5c99819d1d283a6ac6bd0c937 (diff) | |
download | mpv-052584c9e2b87a69ef2359d88989a694910ac506.tar.bz2 mpv-052584c9e2b87a69ef2359d88989a694910ac506.tar.xz |
vo_opengl: add debugging options for testing with padded textures
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/opengl/video.c | 13 | ||||
-rw-r--r-- | video/out/opengl/video.h | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 93930a5a21..7d7641a1ea 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -409,6 +409,8 @@ const struct m_sub_options gl_video_conf = { OPT_FLAG("deband", deband, 0), OPT_SUBSTRUCT("deband", deband_opts, deband_conf, 0), OPT_FLOAT("sharpen", unsharp, 0), + OPT_INTRANGE("opengl-tex-pad-x", tex_pad_x, 0, 0, 4096), + OPT_INTRANGE("opengl-tex-pad-y", tex_pad_y, 0, 0, 4096), OPT_SUBSTRUCT("", icc_opts, mp_icc_conf, 0), {0} @@ -875,14 +877,16 @@ static void init_video(struct gl_video *p) plane->gl_target = gl_target; - plane->w = plane->tex_w = mp_image_plane_w(&layout, n); - plane->h = plane->tex_h = mp_image_plane_h(&layout, n); + plane->w = mp_image_plane_w(&layout, n); + plane->h = mp_image_plane_h(&layout, n); + plane->tex_w = plane->w + p->opts.tex_pad_x; + plane->tex_h = plane->h + p->opts.tex_pad_y; gl->GenTextures(1, &plane->gl_texture); gl->BindTexture(gl_target, plane->gl_texture); gl->TexImage2D(gl_target, 0, plane->gl_internal_format, - plane->w, plane->h, 0, + plane->tex_w, plane->tex_h, 0, plane->gl_format, plane->gl_type, NULL); int filter = plane->use_integer ? GL_NEAREST : GL_LINEAR; @@ -893,7 +897,8 @@ static void init_video(struct gl_video *p) gl->BindTexture(gl_target, 0); - MP_VERBOSE(p, "Texture for plane %d: %dx%d\n", n, plane->w, plane->h); + MP_VERBOSE(p, "Texture for plane %d: %dx%d\n", n, + plane->tex_w, plane->tex_h); } } diff --git a/video/out/opengl/video.h b/video/out/opengl/video.h index 9c76c4a454..f2fe5e4423 100644 --- a/video/out/opengl/video.h +++ b/video/out/opengl/video.h @@ -130,6 +130,7 @@ struct gl_video_opts { int deband; struct deband_opts *deband_opts; float unsharp; + int tex_pad_x, tex_pad_y; struct mp_icc_opts *icc_opts; }; |