summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 07593989ae..e8b66e1ccc 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1380,6 +1380,20 @@ static void glSetupYUVFragprog(gl_conversion_params_t *params) {
}
/**
+ * \brief detect the best YUV->RGB conversion method available
+ */
+int glAutodetectYUVConversion(void) {
+ const char *extensions = mpglGetString(GL_EXTENSIONS);
+ if (strstr(extensions, "GL_ARB_fragment_program"))
+ return YUV_CONVERSION_FRAGMENT;
+ if (strstr(extensions, "GL_ATI_text_fragment_shader"))
+ return YUV_CONVERSION_TEXT_FRAGMENT;
+ if (strstr(extensions, "GL_ATI_fragment_shader"))
+ return YUV_CONVERSION_COMBINERS_ATI;
+ return YUV_CONVERSION_NONE;
+}
+
+/**
* \brief setup YUV->RGB conversion
* \param parms struct containing parameters like conversion and scaler type,
* brightness, ...