summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video_shaders.h
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-05-14 07:05:04 +0200
committerNiklas Haas <git@nand.wakku.to>2016-05-15 20:42:08 +0200
commit362015cd770de486c5dea218d3609450682756ca (patch)
treecd0539b4f10cd09444f74ed0aeb6fb1c7b16533b /video/out/opengl/video_shaders.h
parentdfc7b59909588985ee1be19f313f8bfb858ab8b0 (diff)
downloadmpv-362015cd770de486c5dea218d3609450682756ca.tar.bz2
mpv-362015cd770de486c5dea218d3609450682756ca.tar.xz
vo_opengl: abstract hook texture access behind macro
This macro takes care of rotation, swizzling, integer conversion and normalization automatically. I found the performance impact to be nonexistant for superxbr and debanding, although rotation *did* have an impact due to the extra matrix multiplication. (So it gets skipped where possible) All of the internal hooks have been rewritten to use this new mechanism, and the prescaler hooks have finally been separated from each other. This also means the prescale FBO kludge is no longer required. This fixes image corruption for image formats like 0bgr, and also fixes prescaling under rotation. (As well as other user hooks that have orientation-dependent access) The "raw" attributes (tex, tex_pos, pixel_size) are still un-rotated, in case something needs them, but ideally the hooks should be rewritten to use the new API as much as possible. The hooked texture has been renamed from just NAME to NAME_raw to make script authors notice the change (and also deemphasize direct texture access). This is also a step towards getting rid of the use_integer pass.
Diffstat (limited to 'video/out/opengl/video_shaders.h')
-rw-r--r--video/out/opengl/video_shaders.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/video_shaders.h b/video/out/opengl/video_shaders.h
index bbfeebb576..1f4496fbab 100644
--- a/video/out/opengl/video_shaders.h
+++ b/video/out/opengl/video_shaders.h
@@ -38,8 +38,9 @@ void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler,
void pass_linearize(struct gl_shader_cache *sc, enum mp_csp_trc trc);
void pass_delinearize(struct gl_shader_cache *sc, enum mp_csp_trc trc);
+
void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts,
- int tex_num, float tex_mul, GLenum tex_target, AVLFG *lfg);
+ AVLFG *lfg);
void pass_sample_unsharp(struct gl_shader_cache *sc, float param);