summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.h
Commit message (Collapse)AuthorAgeFilesLines
* libvo, libao: remove useless video and audio output driverswm42012-07-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of these have only limited use, and some of these have no use at all. Remove them. They make maintainance harder and nobody needs them. It's possible that many of the removed drivers were very useful a dozen of years ago, but now it's 2012. Note that some of these could be added back, in case they were more useful than I thought. But right now, they are just a burden. Reason for removal for each module: vo_3dfx, vo_dfbmga, vo_dxr3, vo_ivtv, vo_mga, vo_s3fb, vo_tdfxfb, vo_xmga, vo_tdfx_vid: All of these are for very specific and outdated hardware. Some of them require non-standard kernel drivers or do direct HW access. vo_dga: the most crappy and ancient way to get fast output on X. vo_aa: there's vo_caca for the same purpose. vo_ggi: this never lived, and is entirely useless. vo_mpegpes: for DVB cards, I can't test this and it's crappy. vo_fbdev, vo_fbdev2: there's vo_directfb2 vo_bl: what is this even? But it's neither important, nor alive. vo_svga, vo_vesa: you want to use this? You can't be serious. vo_wii: I can't test this, and who the hell uses this? vo_xvr100: some Sun thing. vo_xover: only useful in connection with xvr100. ao_nas: still alive, but I doubt it has any meaning today. ao_sun: Sun. ao_win32: use ao_dsound or ao_portaudio instead. ao_ivtv: removed along vo_ivtv. Also get rid of anything SDL related. SDL 1.x is total crap for video output, and will be replaced with SDL 2.x soon (perhaps), so if you want to use SDL, write output drivers for SDL 2.x. Additionally, I accidentally damaged Sun support, which made me completely remove Sun/Solaris support. Nobody cares about this anyway. Some left overs from previous commits removing modules were cleaned up.
* Merge remote-tracking branch 'origin/master'wm42012-04-291-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bstr.c bstr.h libvo/cocoa_common.m libvo/gl_common.c libvo/video_out.c mplayer.c screenshot.c sub/subassconvert.c Merge of cocoa_common.m done by pigoz. Picking my version of screenshot.c. The fix in commit aadf1002f8a will be redone in a follow-up commit, as the original commit causes too many conflicts with the work done locally in this branch, and other work in progress.
| * vo_corevideo: restructure this video outputStefano Pigozzi2012-04-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restructure this video output to be similar to vo_gl, even if simpler and less feature complete (for example it's still missing EOSD support). Ideally, it should act as a decent fallback in the case where something breaks in the OSX support of vo_gl. Here's a summary of what changed: * Remove the shared buffer code since it wasn't using any function from the CoreVideo API. Moreover, its presence in vo_corevideo was forcing the non-GUI related code to perform more image copies than necessary. Equivalent shared-buffer functionality will be added in a separate new VO in the next commit (this means OSX GUIs will need to specify a different VO). * Clean up the code to conform a bit more to the mplayer2 conventions. Enforce 80 column wrapping, use a private struct for file variables, use the new libvo api. * Add OSD rendering using OpenGL instead of writing directly on the video image data. * Simplify the logic for the rendering function when dealing with panscan. * Add VOCTRL_REDRAW_FRAME support. * Add colormatrix support by using the built-in API provided by CoreVideo.
* | gl_common: minor cleanup/refactorwm42012-03-311-28/+2
| | | | | | | | | | | | | | | | | | Remove all platform/GUI specific includes from gl_common.h. Get rid of the ugly union in MPGLContext. Use function pointers instead of an ifdef ridden switch statement in uninit_mpglcontext(). Always include glext.h, not only on Windows. None of this should actually change any functionality.
* | gl_common: remove unused glValName()wm42012-03-311-2/+0
| | | | | | | | Using helper programs like apitrace is better for debugging.
* | gl_common: move header hacks into gl_header_fixes.hwm42012-03-311-208/+1
| | | | | | | | | | Keep this horrible (but unfortunately necessary) kludge out of the main code.
* | libvo: add vo_gl3wm42012-03-311-0/+4
| | | | | | | | | | | | | | | | | | This new vo is heavily based on vo_gl.c. It provides better scale filters, dithering, and optional color management with LittleCMS2. It requires OpenGL 3. Many features are enabled by default, so it will be slower than vo_gl. However, it can be tuned to behave almost as vo_gl.
* | gl_common: slightly change win32 GL 3 context creationwm42012-03-311-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code used OpenGL 3 specific functions for querying the extension string when the actual GL 3 context wasn't created yet. This appears to work fine on nVidia, but could break otherwise. Remove the offending getFunctions call and retrieve the needed function pointer manually. (This way the wglCreateContextAttribsARB function pointer can be removed from struct GL too.) (Amusingly exposes a wine bug; they made the same mistake.) Explicitly check the extension string whether the function is available, although this probably doesn't matter in practice. Also retrieve bit depth information on win32.
* | gl_common: OpenGL 3.x context support on windowsKovensky2012-03-311-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also include GL/glext.h on windows: Mingw's (and cygwin's) GL/gl.h has GL/glext.h's inclusion commented out for some reason. Their glext.h is also ancient, so do yourself a favor and replace your GL/glext.h with the one from http://www.opengl.org/registry/api/glext.h . A workaround is needed for NVidia's broken wglCreateContextAtrribsARB: It'll return an error if the requested OpenGL version is previous to 3.2 *and* you request a profile... which is exactly *not* what the wgl_create_context spec says should happen. Handle it by removing the profile request from attribs[] and retrying the context creation once more if the first try fails. And after my first foray into OpenGL I already find a driver quirk. Oh well.
* | gl_common: add OpenGL 3.x context creationwm42012-03-311-21/+82
| | | | | | | | | | | | | | | | | | | | Also add a bunch of GL functions to the function loader, which will be needed by vo_gl3. Remove some unused legacy GL functions from the loader. Use the proper name for glGetProgramivARB. glGetProgramiv is a different and incompatible function. The ARB variant is used for ARB shaders, while the proper one is for GLSL.
* | vo_gl: add "backend" suboption to allow selecting the GUI backendwm42012-02-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The "backend" suboption allows selecting the GUI backend used by vo_gl. Normally, it's auto-selected, but sometimes it's desireable to explicitly select it. Remove the gl_sdl VO. This can now be done by using: --vo=gl:backend=sdl This is based on svn commit 34438, and tries to be compatible with it. The undocumented numeric backend names serve this purpose. (They are undocumented because names are preferred.)
* | vo_gl: minor cleanupsreimar2012-02-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix spelling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34006 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix disabled code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34007 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless pointer indirection for shader program strings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34016 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove usage of glColor3f, there is not really a point in it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34149 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vo_gl: add noise filterreimar2012-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | Add disabled feature: noise filter for vo_gl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34014 b3059339-0415-0410-9bf9-f77b7e298cf2 Hook up -vo gl noise support. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34015 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vo_gl: use generic eosd codewm42011-12-251-0/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This is an experiment. The change probably doesn't matter much. One issue with the old code was that "large" images caused each sub-image to be created and rendered as a new texture. "Large" in this case means larger than 32x32 pixels, which actually isn't very large with screen sizes beyond 1500x1000 pixels. This means rendering a simple subtitle for a fullscreened video may allocate many small textures, one for each glyph. On the other hand, the old code could be fixed by tuning the texture sizes for "modern" work loads. Also, the new code uses less deprecated OpenGL features and draws all sub-images in one batch. There are two possible issues the new code could cause: - Drivers could have performance issues with the larger texture sizes and the number of glTexSubImage2D calls on it - There is only one EOSD texture, which could become full (it's enlarged on demand, but restricted by driver texture size limitations) It has been reported that this is faster on OSX with ATI GPUs than the old code.
* libvo: remove title argument from struct vo_driver.configwm42011-12-061-1/+1
| | | | | | | | | | This affects only the "new" VO API. The config() title argument was barely used, and it's hardcoded to "MPlayer" in vf_vo.c. The X11 and the Cocoa GUI backends, which are the only ones properly supporting window titles, ignored this argument. Remove the title argument. Add the vo_get_window_title function. All GUI VOs are supposed to use it for the window title.
* vo_gl: add native mac osx Cocoa backend for vo_glStefano Pigozzi2011-11-261-0/+1
| | | | | | | | | Add native Cocoa code to display an OpenGL window. Some of the code is based on the OpenGL parts of vo_corevideo but I took the time to remove old code based on Carbon. There is autodetection in the configure script but you can use --enable[disable]-cocoa to enable[disable] this.
* vo_gl: fix 10 bit with Mesa drivers (Intel/Nouveau on Linux)wm42011-11-251-2/+5
| | | | | | | | | | | | | | | | | | The GL_LUMINANCE16 texture format had only 8 bit precision on Mesa based drivers. This caused heavy degradation of the image when playing formats with more than 8 bits per pixel, such as 10 bit h264. Use GL_R16 instead, which at least Mesa and Nvidia drivers actually implement as 16 bit textures. Since sampling from this texture format doesn't return anything meaningful in the other color components (unlike luminance textures), the shader code has to be slightly changed. GL_R16 requires the GL_ARB_texture_rg extension. Check for it, and fall back to the old texture format if it's not available. The low precision of the GL_LUMINANCE16 format has just been fixed in upstream Mesa, but it'll take a while before that fix is available in distros.
* vo_gl: implement screenshotswm42011-11-251-0/+2
|
* vo_gl: remove support for nvidia register combiners (yuv=1)wm42011-10-241-59/+1
| | | | | | | | | | | | | The register combiner color conversion is broken and seems to use a slightly incorrect color matrix (the image looks gray-ish). Completely remove all code related to nVidia register combiners. Unless you have an ancient nVidia GPU, there's no reason to prefer register combiners over fragment shaders. Users with ancient GPUs without fragment shader support can just use -vo xv. Passing yuv=1 (register combiners) as sub option will print a warning and use yuv=2 (fragment shaders) instead.
* vo_gl: remove mesa-buffer suboptionwm42011-10-241-3/+0
| | | | | | | This option enabled using Mesa specific functions, which have never been widely supported, and were removed from Mesa in 2010. http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb2a66fd0c095fe03be5aaf88c8d48f5867425d3
* vo_gl: move window creation functions from vo_gl.c into gl_common.cwm42011-10-241-0/+2
| | | | | | | Now all windowing specific code is in gl_common.c. init_mpglcontext() used to set dummy callbacks for non-optional windowing callbacks. Remove these, as they only lead to confusion.
* vo_gl: convert to new API, clean up codewm42011-10-241-146/+166
| | | | | | | Reformat vo_gl.c, gl_common.c, gl_common.h. Remove all global variables and move them into a context struct (the Windows and SDL backends still refer to global_vo though). Change vo_gl.c to use the "new" VO API.
* vo_gl: Support 9- and 10-bit YUV input for OpenGL VOsreimar2011-07-061-0/+14
| | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33502 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix clear/border color of chroma texture for 9- and 10-bit formats. Avoids pink borders for those formats. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33504 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_gl: Request GL_LUMINANCE16 for 16-bit YUV inputreimar2011-06-291-0/+3
| | | | | | | Request GL_LUMINANCE16 as internal format for > 8 bit YUV formats. Have yet to find a system that actually provides that though. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33453 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_gl: add helper macros to build the yuv conversion type numberreimar2010-11-021-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31742 b3059339-0415-0410-9bf9-f77b7e298cf2
* gl_common.h: Add () around macro arguments.reimar2010-11-021-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31741 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_gl: Add initial stereo supportreimar2010-11-021-0/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31633 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_gl, csputils: dual-license under LGPL v2.1reimar2010-11-021-0/+5
| | | | | | | | | | | | Dual-license gl_common and vo_gl under the LGPL v2.1 or later as an alternative to the GPL license. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31375 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow LGPL for csputils as well, they were previously part of gl_common and are still an important part of it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31376 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31133Uoti Urpala2010-05-071-4/+0
|\
| * Avoid duplicating the GL/gl.h include.reimar2010-04-301-4/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31107 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31097Uoti Urpala2010-04-261-0/+5
|\|
| * Support for auto-selecting the OpenGL backend.reimar2010-04-251-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31086 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Missing gl.h include for SDL backend.reimar2010-04-241-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31070 b3059339-0415-0410-9bf9-f77b7e298cf2
| * First steps to support -vo gl with SDL-based Window handling.reimar2010-04-241-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31062 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31033Uoti Urpala2010-04-261-0/+9
|\|
| * Add some fallback OpenGL defines to fix compilation on Windows.reimar2010-04-071-0/+9
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31027 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31020Uoti Urpala2010-04-261-0/+1
|\|
| * Factor out the YUV->RGB conversion auto-selection and alsoreimar2010-04-041-0/+1
| | | | | | | | | | | | | | | | 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
* | Merge svn changes up to r31004Uoti Urpala2010-04-261-79/+84
|\|
| * Implement OpenGL-based YUV to RGB version for Radeon 9200 classreimar2010-04-031-0/+5
| | | | | | | | | | | | | | cards on OS X. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30993 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add mpgl prefix to all OpenGL-related function pointers.reimar2010-04-031-79/+79
| | | | | | | | | | | | | | | | | | 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
* | Merge svn changes up to r30185Uoti Urpala2010-01-081-0/+11
|\|
| * Add pointers to a few more standard OpenGL functions to ease future extensions.reimar2010-01-031-0/+11
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30179 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30165Uoti Urpala2010-01-081-7/+5
|\|
| * Extract functions to generate yuv->rgb matrices and lookup tables into areimar2009-12-311-10/+1
| | | | | | | | | | | | | | 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-3/+8
| | | | | | | | | | | | | | 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-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30139 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30104Uoti Urpala2009-12-301-0/+3
|\| | | | | | | Ignore the broken correct-pts change in r30100.
| * Define GL_GENERATE_MIPMAP ourselves if necessary.reimar2009-12-191-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30074 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30065Uoti Urpala2009-12-291-6/+6
|\|