diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 18:06:00 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 18:06:00 +0300 |
commit | 837c48ddeef9066f16c119f3cac412d37a25766a (patch) | |
tree | 61b95ec92e22522c8ccd07cd213f66dd56c1c197 /libvo/gl_common.c | |
parent | e913d6c5dabcf342d8c1a7070382d712fc354948 (diff) | |
parent | 7bf961b1a3bbea070f40247417965493965729e1 (diff) | |
download | mpv-837c48ddeef9066f16c119f3cac412d37a25766a.tar.bz2 mpv-837c48ddeef9066f16c119f3cac412d37a25766a.tar.xz |
Merge svn changes up to r31020
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r-- | libvo/gl_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c index bdc501998e..bb2e7ce10c 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -1381,6 +1381,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, ... |