summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video_shaders.h
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-09-05 14:03:00 +0200
committerwm4 <wm4@nowhere>2015-09-09 18:17:44 +0200
commiteb56807b414229a00cd2bee5e74beae5a01e8fb1 (patch)
tree7d2c22371b50208e989c35932b511e5271a83946 /video/out/opengl/video_shaders.h
parent7929e36e9329c842790193389000e968f5a57426 (diff)
downloadmpv-eb56807b414229a00cd2bee5e74beae5a01e8fb1.tar.bz2
mpv-eb56807b414229a00cd2bee5e74beae5a01e8fb1.tar.xz
vo_opengl: move self-contained shader routines to a separate file
This is mostly to cut down somewhat on the amount of code bloat in video.c by moving out helper functions (including scaler kernels and color management routines) to a separate file. It would certainly be possible to move out more functions (eg. dithering or CMS code) with some extra effort/refactoring, but this is a start. Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'video/out/opengl/video_shaders.h')
-rw-r--r--video/out/opengl/video_shaders.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/video/out/opengl/video_shaders.h b/video/out/opengl/video_shaders.h
new file mode 100644
index 0000000000..05d622750c
--- /dev/null
+++ b/video/out/opengl/video_shaders.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of mpv.
+ *
+ * mpv is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * mpv is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with mpv. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * You can alternatively redistribute this file and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ */
+
+#ifndef MP_GL_VIDEO_SHADERS_H
+#define MP_GL_VIDEO_SHADERS_H
+
+#include "common.h"
+#include "utils.h"
+#include "video.h"
+
+void sampler_prelude(struct gl_shader_cache *sc, int tex_num);
+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);
+void pass_sample_bicubic_fast(struct gl_shader_cache *sc);
+void pass_sample_sharpen3(struct gl_shader_cache *sc, struct scaler *scaler);
+void pass_sample_sharpen5(struct gl_shader_cache *sc, struct scaler *scaler);
+void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler,
+ int w, int h);
+
+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);
+
+#endif