summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video_shaders.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-07-20 11:00:06 +0200
committerNiklas Haas <git@haasn.xyz>2017-07-24 17:19:31 +0200
commitf338ec45912846a75dbb4217cad000ceb9b33d40 (patch)
treec96ec928558272dea6a5ed9313f547d1f4d9e996 /video/out/opengl/video_shaders.h
parentb196cadf9f9f6ea210db9236c2b26523a9a2719f (diff)
downloadmpv-f338ec45912846a75dbb4217cad000ceb9b33d40.tar.bz2
mpv-f338ec45912846a75dbb4217cad000ceb9b33d40.tar.xz
vo_opengl: implement compute shader based EWA kernel
This performs almost 50% faster on my machine (!!), from 4650μs down to about 3176μs for ewa_lanczossharp. It's possible we could use a similar approach to speed up the separable scalers, although with vastly simpler code. For separable scalers we'd also have the additional huge benefit of only needing padding in one direction, so we could potentially use a big 256x1 kernel or something to essentially compute an entire row at once.
Diffstat (limited to 'video/out/opengl/video_shaders.h')
-rw-r--r--video/out/opengl/video_shaders.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/opengl/video_shaders.h b/video/out/opengl/video_shaders.h
index e0594f28f3..597027ca6b 100644
--- a/video/out/opengl/video_shaders.h
+++ b/video/out/opengl/video_shaders.h
@@ -32,6 +32,9 @@ void pass_sample_separated_gen(struct gl_shader_cache *sc, struct scaler *scaler
int d_x, int d_y);
void pass_sample_polar(struct gl_shader_cache *sc, struct scaler *scaler,
int components, int glsl_version);
+void pass_compute_polar(struct gl_shader_cache *sc, struct scaler *scaler,
+ int components, int bw, int bh, float ratiox,
+ float ratioy);
void pass_sample_bicubic_fast(struct gl_shader_cache *sc);
void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler,
int w, int h);