aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
...
* vo_opengl_old: remove ancient ATI-specific YUV conversionsGravatar wm42015-01-02
| | | | | | | | | | While there's no actual need to get rid of these, I want to make sure nobody actually needs this stuff, and removing it is the best way to get to know this. We still can revert this commit if it turns out there is a significant need for this stuff. The final goal is removing vo_opengl_old entirely. Add a warning, which basically announces this intention.
* cocoa: fix uninitialization while in fullscreenGravatar Stefano Pigozzi2015-01-01
| | | | | | | | This is only needed for switching video track with `_`, since Cocoa automatically handles cleaning up the application's presentation options when quitting the process. Fixes #1399
* gl_hwdec_vda: refuse to work with old OpenGL versionsGravatar wm42014-12-31
| | | | | | | | | | | | The way we use rectangle textures (required by VDA for no reason) works onl in OpenGL 3.0 or higher. Below that, the shader will fail to compile. We could add support for older OpenGL versions, but that would be a major pain. This normally doesn't matter; mpv itself always creates OpenGL 3.2 contexts on OSX. But it could matter if a client API user uses vo_opengl_cb, and gives it a 2.1 context (which OSX also allows you to create).
* vo_opengl_cb: simplify API uninitializationGravatar wm42014-12-31
| | | | | | | | | | | Until now, calling mpv_opengl_cb_uninit_gl() at a "bad moment" could make the whole thing to explode. The API user was asked to avoid such situations by calling it only in "good moments". But this was probably a bit too subtle and could easily be overlooked. Integrate the approach the qml example uses directly into the implementation. If the OpenGL context is to be unitialized, forcefully disable video, and block until this is done.
* vo_opengl_cb: pass context directlyGravatar wm42014-12-31
| | | | | This is simpler than setting the context after VO creation, which requires the code to check for the context on every entrypoint.
* video: pass some VO params as structGravatar wm42014-12-31
| | | | | Not particularly elegant, but better than adding more and more stuff to the relevant function signatures.
* command: make empty vf-metadata not an errorGravatar wm42014-12-30
| | | | | | | | If a filter exists, but has no metadata, just return success. This allows the user to distinguish between no metadata available, and filter not inserted. See #1408.
* vf: fix crash if filter doesn't provide control entrypointGravatar wm42014-12-30
| | | | | | | | This input command crashed: vf add @mf:format=yuv420p ; show_text "${vf-metadata/mf}" Fixes #1408.
* w32_common: allow window resizing with --no-borderGravatar James Ross-Gowan2014-12-29
|
* vo_opengl: Ignore approx-gamma for BT.2020-CLGravatar Niklas Haas2014-12-29
| | | | | | The details of the non-linear transformation from/to BT.2020's constant luminance system don't really make sense with any other gamma curve, since changing the gamma curve completely breaks the chroma channels.
* cocoa: move the gl function loader to gl_cocoa.cGravatar Stefano Pigozzi2014-12-28
|
* screenshots: set AVFrame parametersGravatar wm42014-12-28
| | | | | | | Currently, libavcodec is rather lenient, but it might get stricter in the future. Fixes #1398.
* vo_opengl: don't use 10 bit video on Intel GPUsGravatar wm42014-12-24
| | | | | | | | | | | | vo_opengl was originally written against OpenGL 3 core, and it seems GPUs/drivers supporting this are mostly sane. Later, it was made to work with OpenGL 2.1 too. Lately we removed the requirement for RG textures, and look, someone reported a problem with "lesser" Intel GPUs. This commit does the same in vo_opengl what was added to vo_opengl_old a long time ago. Fixes #1383.
* vo_opengl_cb: use VAOs even in OpenGL 2.1Gravatar wm42014-12-23
| | | | | | | | Using them reduces state change, since now at least vo_opengl_cb has to setup/break the vertex array bindings on every frame if no VAOs are available. This reverts the VAO related change in commit f64665e7.
* vo_opengl_cb: always setup/break vertex array bindingsGravatar wm42014-12-23
| | | | | | | | | | | Originally, this code was written to have full control over the OpenGL state, rather than having to cooperate with unknown components by being embeded like vo_opengl_cb is meant to be. As a consequence, it was thought to be ok to setup a global binding (if the context is below OpenGL 3.0, which guarantees VAOs). This could break badly. Fix it by setting up and breaking the bindings on entry/exit.
* vo_opengl: fix build on OSXGravatar wm42014-12-23
| | | | Missing modern OpenGL symbols again.
* vo_opengl: don't allow setting 3D LUT if unsupportedGravatar wm42014-12-23
| | | | | The code was always uploading the 3D LUT (even of unused), as long as vo_opengl was setting a icc-profile. This could crash with GLES 2.
* vo_opengl: make use of newer OpenGL logging APIGravatar wm42014-12-23
| | | | | | GL_ARB_debug_output provides a logging callback, which can be used to diagnose problems etc. in case the driver supports it. It's enabled only if the vo_opengl "debug" suboption is set.
* vo_opengl_cb: parse renderer parametersGravatar wm42014-12-22
| | | | | | Now it accepts the same renderer arguments as vo_opengl. This also disables debug checks by default, and reverts the background color override. Both can now be controlled by the host application.
* vo_opengl, vo_opengl_cb: check GL version in rendererGravatar wm42014-12-22
| | | | | | vo_opengl actually checks this in the context creation code already, but it still increases robustness in case the requirements are changed later.
* vo_opengl_cb: free context on exitGravatar wm42014-12-22
| | | | | | | Minor memory leak. Actually, this also exposes some problems in the QtQuick example. This will have to be fixed in the example.
* vo_opengl: fix feature detectionGravatar wm42014-12-22
| | | | Fixes #1373.
* vo_opengl: improve fallback handling with GLESGravatar wm42014-12-21
| | | | | | | | | Whether we have texture_rg doesn't matter much anymore; the scaler should be fine with this. But on ES 2.0, 1st class arrays are missing, so even if filterable float textures should be available, it won't work. Dithering (at least the "fruit" variant) will not work either, because it uses floats.
* vo_opengl: silence an INVALID_ENUM error with GLES2Gravatar James Ross-Gowan2014-12-21
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: GLES does not support GL_BGRAGravatar wm42014-12-20
| | | | | | | | | | | | | Apparently GLES 2 and 3 do not support this. (The implementations I tested with were derived from desktop OpenGL and were not overly strict with this.) This is no problem; just use GL_RGBA and mangle the channels in the shader. Also disable direct support for image formats like IMGFMT_RGB555 with GLES; at least some of them are not supported in this form, and the formats aren't important anyway.
* vo_opengl_old: fix OSD regressionGravatar wm42014-12-20
| | | | | | | | | | | | | | | | | Commit 0e8fbdbd removed the rg_texture requirement from vo_opengl; commit 541f6731 changed to a more convenient method. Both commits broke vo_opengl_old in some ways. vo_opengl_old always requires GL_ALPHA for single-channel texture, because it draws the OSD without shaders and by using certain blend modes. So we need to explicitly distinguish between vo_opengl and vo_opengl_old in the OSD renderer, and force fixed texture formats for vo_opengl_old. The other logic is specific to the internals of vo_opengl. (Although it might be possible to get the same result by playing with the old GL fixed-function functions in vo_opengl_old. But seems like a waste of time.) Fixes #1370.
* cocoa: mark window for redraw after title changeGravatar Stefano Pigozzi2014-12-20
| | | | | | | This used to work correctly without the call to displayIfNeeded. I think this may only be needed for Yosemite. Fixes #1330
* vo_opengl: remove pointless glFinish callsGravatar wm42014-12-19
|
* vo_opengl: skip GLES when autoprobingGravatar wm42014-12-19
| | | | | | | | There are probably bugs with GLES support; also, if you somehow get GLES instead of desktop GL on a desktop computer, something else is probably wrong. So I see no point in using this automatically. We first need to find out whether the GLES support works on real hardware, and whether it is useful at all.
* vo_opengl, x11: add ES context creation via GLXGravatar wm42014-12-19
| | | | | | | | Apparently GLX can do this, so using EGL is not strictly required. This code tries to create an ES context if creating a desktop GL context fails. Also, a "x11es" backend for forcing ES (instead of desktop GL) is added, mostly for testing and debugging.
* vo_opengl: fail if required functions are missingGravatar wm42014-12-19
| | | | | | | Before this, missing additional but required functions were ignored. ("Main" functions still made it error out.) But we pretty much expect that these are present on a given version level, and only an extremely buggy OpenGL implementation would not do this.
* vo_opengl: better probe handlingGravatar wm42014-12-19
| | | | | | | | | | | | | Involve detection of software renderers in the probing properly. Other VOs could handle probing also more gracefully, and e.g. produce less noise if an API is unavailable. (Although other than the OpenGL VOs, only vo_wayland will.) Now the "sw" suboption for vo_opengl[_old] is strictly speaking not needed anymore. Doing "--vo=opengl" disables the probing logic, and will always force it, if possible. Includes some simplifications as well.
* vo_opengl: minor simplificationGravatar wm42014-12-19
| | | | The parameter to default_tex_params() is always the same.
* vo_opengl: unborkGravatar wm42014-12-19
| | | | | | | | Probably. The version handling schema is a bit strange (and led to a tricky and obvious bug), but it's quite similar to what OpenGL does at some places, so I blame the OpenGL standard.
* vo_opengl: add GLES 2 supportGravatar wm42014-12-19
| | | | | | | | Rather basic support. Almost nothing works, and even if it does, it's bound to be inefficient (due to texture upload). This was tested with the nVidia desktop binary drivers, which provide GLES 2 support only. However, nVidia is not known to be very strict about OpenGL, and the driver is very new too, so the vo_opengl code will have bugs too.
* vo_opengl: mess with PixelStorei state managementGravatar wm42014-12-19
| | | | | | | | | | | | | | | | This is needed for GLES 2 support. GLES 2 doesn't support GL_UNPACK_ROW_LENGTH, and we shouldn't even use this constant, since a GLES implementation could raise an error. So set it only if neccessary, and leave it in the default state otherwise. This also smuggles in a ES 2 fallback for glUploadTex(), and querying an extension relevant for ES 2. For the alignment state (GL_[UN]PACK_ALIGNMENT) do the same for symmetry. All 4 states (alignment/rows x pack/unpack) are now assumed to be in their initial states by default. Also redo the PixelStorei handling in the function table. I could rebase this, but look at the commit time.
* vo_opengl: disable some unavailable features under ESGravatar wm42014-12-19
| | | | There are probably many more which I overlooked.
* vo_opengl: clean up GL ES function loadingGravatar wm42014-12-18
| | | | | | | | | | | | | | | | | | Previously, this was sort of messed together with desktop OpenGL loading. Add explicit support for ES, and clean up the mess. Also sort the function arrays alphabetically (at least most of them). In some cases, add functions to multiple sections. This keeps the number of sections down. Don't check for GL_ARB_vertex_array_object. This feature must be used in OpenGL 3 core, while it may be not available at all in earlier versions, and not using it if it's available as extension only has no advantages. This commit also considers GLES 2, because actual support for it will be added with a later commit. Also get rid of some MPGL_VER() uses (see some commits ago).
* vo_opengl: do not use 4x3 matrixGravatar wm42014-12-18
| | | | | | | | | | | This was a nice trick to get the mpv colormatrix directly into OpenGL, because the memory representation happened to match. Unfortunately, OpenGL ES 2 doesn't have glUniformMatrix4x3fv(). Even more unfortunately, the memory representation is now incompatible. It would be nice to change it, but that would mean getting into a big mess.
* vo_opengl: simplify some aspects of the GL function loaderGravatar wm42014-12-18
|
* vo_opengl, x11: make legacy context warning not an errorGravatar wm42014-12-18
| | | | | | Really, this doesn't actually matter. It's printed as error only because it was once thought to be an mostly unneeded fallback, but it turned out this is still frequently needed, and users are getting confused.
* x11: fix mysterious issue with window embedding on OpenBoxGravatar wm42014-12-18
| | | | | | | | | | | | | | | | | | | For some reason, when using window embedding, and the window manager is OpenBox, calling XSetWMNormalHints() before the window is mapped, the initial window position will be off. It leaves some vertical space, instead of placing it on the top/left corner. Suspiciously, the vertical space is as much as a the height of normal window decoration. I don't know what kind of issue this is. Possibly an OpenBox bug, but then this happens even if the override-redirect flag is set. (This flag basically tells the X server to ignore the window manager. Normally we don't set it.) On other window managers, it works fine. So I don't know why this is happening. But this is easy to workaround. XSetWMNormalHints() isn't needed at all if embedding. Should fix #1235.
* x11: minor improvementsGravatar wm42014-12-18
| | | | | | Always include the window position in winrc, even if the window embedded. This should give the correct positions for things which still interact with global coordinates, such as the xrandr code.
* vo_opengl: minor simplification in function loaderGravatar wm42014-12-18
| | | | Don't force every entries without functions to define a dummy array.
* vo_opengl: simplify the case without texture_rgGravatar wm42014-12-18
| | | | | | | | | | | | If GL_RED was not available, we used GL_ALPHA. But this is an unnecessary complication, and it's easier to use GL_LUMINANCE instead. With the latter, a texture will return the .r component set, and as long as the shader doesn't look at the other components, the shader doesn't need any changes. Some of the changes added in 0e8fbdbd are now unneeeded. Also, realign the entire gl_byte_formats_legacy table.
* vo_opengl: don't assume legacy OpenGL is available with GLESGravatar wm42014-12-17
| | | | | | OpenGL 3.0 has the weird situation that it's "hard" to detect whether legacy GL is really present. Since we pretend that we have OpenGL 3.0 if we use GLES, it was assuming legacy GL is available.
* vo_opengl: add some OpenGL standard symbols missing on OSXGravatar wm42014-12-17
| | | | | | Older OSX versions are missing some OpenGL 3 symbols, apparently. At least there's some precedent in the headers. Just add the symbols manually for now to fix OSX (on travis-ci) compilation.
* vo_opengl: GLES 3 supportGravatar wm42014-12-17
| | | | | | | | | | | | Tested with MESA on software emulation. Seems to work well, although the default FBO format in opengl-hq disables most interesting features. I have no idea how well it will work on real hardware (or if it does at all). Unfortunately, some features, including playback of 10 bit video, are not supported. Not sure what to do about this. GLES 2 or 1 do not work.
* vo_opengl: remove useless FBO testGravatar wm42014-12-17
| | | | | | | | | Remove the readback stuff; it was a useless mess. Don't test GL_R16 as FBO. The intention was to measure the effective bitdepth of the texture, except that it was never actually done. (There's also a OpenGL function which is supposed to retrieve the bitdepth, but we don't use that either.)
* vo_opengl: cleanup dither texture creationGravatar wm42014-12-17
| | | | Might be slightly more compatible too, and will make it work on GLES.