summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
Commit message (Collapse)AuthorAgeFilesLines
* Factor out the YUV->RGB conversion auto-selection and alsoreimar2010-04-041-0/+14
| | | | | | | | enable auto-selection of ATI fragment shaders since they should do accurate conversions now. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31006 b3059339-0415-0410-9bf9-f77b7e298cf2
* Share more code between the two ATI fragment shader YUV to RGBreimar2010-04-041-69/+87
| | | | | | | | conversion methods and extend them to support more accurate conversion (though at the cost of some speed). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30995 b3059339-0415-0410-9bf9-f77b7e298cf2
* Try to detect and work around broken glXGetProcAddress on atreimar2010-04-031-0/+6
| | | | | | | least PPC OS X 10.4. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30994 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement OpenGL-based YUV to RGB version for Radeon 9200 classreimar2010-04-031-0/+50
| | | | | | | cards on OS X. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30993 b3059339-0415-0410-9bf9-f77b7e298cf2
* Indentation fix.reimar2010-04-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30988 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add mpgl prefix to all OpenGL-related function pointers.reimar2010-04-031-254/+254
| | | | | | | | | This is necessary because at least the GetString symbol causes clashes on PPC OSX 10.4, causing -vo gl to always crash. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30987 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add newlines to generated fragment program to make both fragment program dumpreimar2010-03-121-117/+117
| | | | | | | with -v more readable and compiler error message more understandable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30882 b3059339-0415-0410-9bf9-f77b7e298cf2
* Try the more specific names first for the SwapInterval function to make it lessreimar2010-01-281-1/+1
| | | | | | | likely we get an incompatible one. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30451 b3059339-0415-0410-9bf9-f77b7e298cf2
* glXSwapIntervalEXT is defined to take different arguments from ↵reimar2010-01-281-1/+1
| | | | | | | | | | glXSwapIntervalSGI, so do not try to use it. Patch by Stephen Warren [swarren nvidia com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30450 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add pointers to a few more standard OpenGL functions to ease future extensions.reimar2010-01-031-0/+22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30179 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for 16-bit per component YUV formats.reimar2009-12-311-3/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30152 b3059339-0415-0410-9bf9-f77b7e298cf2
* Extract functions to generate yuv->rgb matrices and lookup tables into areimar2009-12-311-101/+6
| | | | | | | separate file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30150 b3059339-0415-0410-9bf9-f77b7e298cf2
* Put the colourspace-related variables into a separate struct to easereimar2009-12-311-10/+10
| | | | | | | extracting the code and sharing with other vos. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30149 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support all planar YUV formats in OpenGL vos.reimar2009-12-301-4/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30139 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change %f to %e in generated fragment programs to avoid losing precision ↵reimar2009-12-201-26/+26
| | | | | | unnecessarily. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30078 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a broken indentation.reimar2009-12-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30070 b3059339-0415-0410-9bf9-f77b7e298cf2
* Enable running fragment programs with YUV_CONVERSION_NONEreimar2009-12-191-2/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30069 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename GL_* defines to CONFIG_GL_*reimar2009-12-191-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30065 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make the check for X11 and WIN32 backends for OpenGL separate.reimar2009-12-191-3/+3
| | | | | | This fixes compilation on Windows with X11 but no GLX available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30063 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use a fallback to make sure the basic OpenGL functions are available instead ofreimar2009-12-091-45/+55
| | | | | | | initializing them which does not work well with reinitializations. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29984 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by ↵reimar2009-12-091-69/+69
| | | | | | OpenGL headers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29983 b3059339-0415-0410-9bf9-f77b7e298cf2
* Pass all OpenGL functions through a function pointer indirection.reimar2009-12-081-59/+145
| | | | | | | | This still needs more work, but should allow supporting e.g. GLX-OpenGL and Win32-OpenGL with a single binary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29981 b3059339-0415-0410-9bf9-f77b7e298cf2
* Very preliminary code to allow selecting the OpenGL backend at runtime.reimar2009-12-081-7/+71
| | | | | | | | | Works in the currently supported cases for only Win32 and only X11, the mixed case is not working yet though. But applied anyway since the code is slightly less messy than the current one. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29980 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move OpenGL-related messages that have large output from MSGL_V to MSGL_DGB2.reimar2009-11-211-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29947 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for Windows OpenGL rendering onto a device instead of into a window.reimar2009-11-211-4/+4
| | | | | | | | | Has little use except for experimenting - on Windows 9x it could be used to render on monitors that were not managed by Windows, but that feature was removed in newer Windows versions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29946 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support RGB48NE format in OpenGL vos (only really useful once they are modifiedreimar2009-11-211-0/+4
| | | | | | | to actually use GLX/WGL visuals with more than 8 bits per component if available). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29944 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use calloc to allocate a rather large (currently 32k) array instead ofreimar2009-11-201-1/+2
| | | | | | | putting it on the stack, performance should not matter much here. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29938 b3059339-0415-0410-9bf9-f77b7e298cf2
* Also check GLX client and server strings for extensionsreimar2009-09-271-2/+27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29721 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change getdladdr to always use dlopen, dlsym and then dlclose.reimar2009-04-231-11/+6
| | | | | | | | | Performance is not really important and dlsym(0, ...) is not defined while the more correct dlsym(RTLD_DEFAULT, ...) is a GNUism (although POSIX does reserve RTLD_DEFAULT). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29224 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing 'void' keyword to parameterless function declarations.diego2009-01-051-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28267 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add experimental support for glXAllocateMemoryMESAreimar2008-12-051-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28101 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for YCBCR MESA texture format to vo_gl.reimar2008-12-051-0/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28093 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics, whitespace and "... == NULL" to "!..."reimar2008-12-031-8/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28070 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace some of the different inconsistent XGetGeometry uses by areimar2008-11-151-7/+1
| | | | | | | vo_x11_update_geometry function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27919 b3059339-0415-0410-9bf9-f77b7e298cf2
* For fragment programs, check GL_MAX_TEXTURE_IMAGE_UNITS instead of ↵reimar2008-11-061-1/+1
| | | | | | GL_MAX_TEXTURE_UNITS. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27899 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix glAdjustAlignment parameter in glCreateClearTexreimar2008-09-201-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27654 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change glCreateClearTex to use the same host data format as later uploads.reimar2008-09-201-8/+14
| | | | | | | This fixes at least some of the massive performance problems the ATI drivers have. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27653 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace casual GPL notices by proper license headers.diego2008-09-071-6/+25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27541 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify yuv to rgb conversion matrix stuff.reimar2008-05-241-51/+52
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26871 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: alignreimar2008-05-241-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26870 b3059339-0415-0410-9bf9-f77b7e298cf2
* update doxygen commentsreimar2008-05-241-29/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26869 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a filter strength parameter for blurring/sharpening scalers.reimar2008-05-241-8/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26868 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use a struct instead of a huge and further growing argument list.reimar2008-05-241-46/+37
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26866 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix and simplify lscale=2 (bicub_x) scaler, produced funnyreimar2008-03-121-7/+7
| | | | | | | noise on ATI cards due to cdelta.y never being set. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26227 b3059339-0415-0410-9bf9-f77b7e298cf2
* Try harder to find OpenGL functions on Windows.reimar2008-02-111-1/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25985 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow for larger fragment programs.reimar2008-01-291-3/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25913 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a coefficient for lscale=5 OpenGL modereimar2008-01-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25797 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify and silence lots of warningsreimar2008-01-191-29/+29
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25790 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix using both lscale and cscale 4reimar2008-01-191-15/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25788 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a fragment program for 5x5 unsharp maskingreimar2008-01-181-0/+34
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25786 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove leftover backslashreimar2008-01-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25785 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplifyreimar2008-01-181-6/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25784 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use the same unsharp filter template for 2D and RECT texturesreimar2008-01-181-32/+21
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25783 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix OpenGL unsharp filterreimar2008-01-161-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25773 b3059339-0415-0410-9bf9-f77b7e298cf2
* Create/allocate conversion textures before scaler textures.reimar2008-01-151-2/+2
| | | | | | | Allows overriding gamma ramp texture also when using a non-trivial scaler. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25758 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add experimental unsharp-mask OpenGL scaler. Certainly not yet perfect.reimar2008-01-151-0/+35
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25757 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a forgotten case to create_scaler_textures, avoids an incorrect warning.reimar2008-01-151-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25755 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix typo in commentreimar2007-10-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24805 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a bicubic scaler that needs a lot more instruction but noreimar2007-09-041-0/+40
| | | | | | | extra texture lookup git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24338 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation after patch to remove global vo_hdcreimar2007-09-031-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24335 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove global vo_hdc, since it is recommended to release a DC as soon as ↵reimar2007-09-031-6/+12
| | | | | | possible. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24334 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a new GPU-based scaling method to vo glreimar2007-03-111-0/+32
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22507 b3059339-0415-0410-9bf9-f77b7e298cf2
* The fragment program functions are and most likely always will be ARB-only,reimar2007-02-251-6/+6
| | | | | | | so do not check for other function name variants. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22344 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation under MinGW with X11 enabledreimar2006-12-171-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21647 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid void * arithmeticreimar2006-11-251-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21217 b3059339-0415-0410-9bf9-f77b7e298cf2
* Put files fully owned by my under GPL v2 "or later"reimar2006-11-171-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20978 b3059339-0415-0410-9bf9-f77b7e298cf2
* Some more documentationreimar2006-07-281-0/+57
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19226 b3059339-0415-0410-9bf9-f77b7e298cf2
* marks some read-only char* inside structs as const, patch by Stefan Huehner, ↵reynaldo2006-07-271-4/+4
| | | | | | stefan At huehner-org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19199 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify and and speedup generation of yuv2rgb and gamma map tablesreimar2006-07-231-37/+58
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19172 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix off-by-one error for negative strides (flipped image)reimar2006-07-101-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18993 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support for 16 bit ppmsreimar2006-07-081-10/+30
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18966 b3059339-0415-0410-9bf9-f77b7e298cf2
* rm unnecesary casts from void* - part 2reynaldo2006-07-021-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18883 b3059339-0415-0410-9bf9-f77b7e298cf2
* reduce number of texture indirections to support older cardsreimar2006-06-221-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18790 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use border for bicubic filter helper texture, since it will cause ATIreimar2006-06-131-5/+5
| | | | | | | | | | cards to switch to software mode and be unusable. Double texture size to avoid this causing artefacts. Note: yuv=6 will not be changed, so it will stay unusable with ATI cards unless ATI starts supporting this. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18696 b3059339-0415-0410-9bf9-f77b7e298cf2
* Optimize bicubic filteringreimar2006-06-121-11/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18689 b3059339-0415-0410-9bf9-f77b7e298cf2