comparison libvo/gl_common.c @ 30964:a5c6b37b3af6

Factor out the YUV->RGB conversion auto-selection and also enable auto-selection of ATI fragment shaders since they should do accurate conversions now.
author reimar
date Sun, 04 Apr 2010 16:56:30 +0000
parents d3f31670562d
children 529614f44431
comparison
equal deleted inserted replaced
30963:e9eedc6fa642 30964:a5c6b37b3af6
1378 loadGPUProgram(GL_FRAGMENT_PROGRAM, yuv_prog); 1378 loadGPUProgram(GL_FRAGMENT_PROGRAM, yuv_prog);
1379 free(yuv_prog); 1379 free(yuv_prog);
1380 } 1380 }
1381 1381
1382 /** 1382 /**
1383 * \brief detect the best YUV->RGB conversion method available
1384 */
1385 int glAutodetectYUVConversion(void) {
1386 const char *extensions = mpglGetString(GL_EXTENSIONS);
1387 if (strstr(extensions, "GL_ARB_fragment_program"))
1388 return YUV_CONVERSION_FRAGMENT;
1389 if (strstr(extensions, "GL_ATI_text_fragment_shader"))
1390 return YUV_CONVERSION_TEXT_FRAGMENT;
1391 if (strstr(extensions, "GL_ATI_fragment_shader"))
1392 return YUV_CONVERSION_COMBINERS_ATI;
1393 return YUV_CONVERSION_NONE;
1394 }
1395
1396 /**
1383 * \brief setup YUV->RGB conversion 1397 * \brief setup YUV->RGB conversion
1384 * \param parms struct containing parameters like conversion and scaler type, 1398 * \param parms struct containing parameters like conversion and scaler type,
1385 * brightness, ... 1399 * brightness, ...
1386 * \ingroup glconversion 1400 * \ingroup glconversion
1387 */ 1401 */