summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video_shaders.glsl
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-02-20 22:12:02 +0100
committerNiklas Haas <git@nand.wakku.to>2015-02-24 21:52:14 +0100
commit010cf183fe3133fe6f581f9b25137827c6b26a39 (patch)
treefaad6b47083ffde79c73aa9bd7e479e2d0a36e37 /video/out/gl_video_shaders.glsl
parent9fa73b6f645952247d3d18e617a357a5d02f644e (diff)
downloadmpv-010cf183fe3133fe6f581f9b25137827c6b26a39.tar.bz2
mpv-010cf183fe3133fe6f581f9b25137827c6b26a39.tar.xz
vo_opengl: greatly increase smoothmotion performance
Instead of rendering and upscaling each video frame on every vsync, this version of the algorithm only draws them once and caches the result, so the only operation that has to run on every vsync is a cheap linear interpolation, plus CMS/dithering. On my machine, this is a huge speedup for 24 Hz content (on a 60 Hz monitor), up to 120% faster. (The speedup is not quite 250% because of the overhead that the larger FBOs and CMS provides) In terms of the implementation, this commit basically swaps interpolation and upscaling - upscaling is moved to inter_program, and interpolation is moved to the final_program. Furthermore, the main bulk of the frame rendering logic (upscaling etc.) was moved to a separete function, which is called from gl_video_interpolate_frame only if it's actually necessarily, and skipped otherwise.
Diffstat (limited to 'video/out/gl_video_shaders.glsl')
-rw-r--r--video/out/gl_video_shaders.glsl3
1 files changed, 0 insertions, 3 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl
index 965a8f725b..74a2b5c3e6 100644
--- a/video/out/gl_video_shaders.glsl
+++ b/video/out/gl_video_shaders.glsl
@@ -393,9 +393,6 @@ void main() {
texture(texture0, texcoord),
texture(texture1, texcoord),
inter_coeff);
- // debug code to visually check the interpolation amount
- // vec4 acolor = texture(texture0, texcoord) -
- // inter_coeff * texture(texture1, texcoord);
#elif USE_CONV == CONV_PLANAR
vec4 acolor = vec4(SAMPLE(texture0, textures_size[0], texcoord).r,
SAMPLE_C(texture1, textures_size[1], chr_texcoord).r,