aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out
Commit message (Collapse)AuthorAge
* win32: fix some Clang warningsGravatar James Ross-Gowan2016-11-17
| | | | | | | | - win32-console-wrapper.c was inconsistently using the explicit Unicode versions of some Windows API functions and structures. - vo.c should use llabs for int64_t, since long is 32-bit on Windows. - vo_direct3d.c had a potential use of an uninitialized variable if it took the first goto error_exit.
* vo_opengl: blend against background color for --alpha=blendGravatar Philip Sequeira2016-11-13
| | | | | Do it after color management, etc. so that it matches the color drawn in the margins.
* cocoa: option to scale window by HiDPI scale factorGravatar Akemi2016-11-11
| | | | | | | | | | Deactivating this options makes it possible to circumvent the default OS X behavior of using points. Windows on HiDPI resolutions won't open in double the size anymore and videos are display in their native resolution when windowed. Fixes #3716
* vo_opengl: fix --blend-subtitles handlingGravatar wm42016-11-07
| | | | | | | | | | | | | The intention was that if --blend-subtitles is enabled, the frame should always be re-rendered instead of using e.g. a cached scaled frame. The reason is that subtitles can change anyway, e.g. if you pause and change subtitle size and such. On the other hand, if the frame is marked as repeated, it should always use the cached copy. Actually "simplify" this and drop the cache only if playback is paused (which frame->still indicates indirectly). Also see PR #3773.
* vo_opengl: fix redrawing with hardware decodingGravatar wm42016-11-07
| | | | | | | | unmap_current_image() is called after rendering. This essentially invalidates the textures, so we can't assume that the image is still present. Also see PR #3773.
* Apply autofit-larger after autofit-smallerGravatar Nils Maier2016-11-03
| | | | | | This prevents the window scaling beyond screen dimensions Fixes #3753
* filter_kernels: add ability to taper kernels/windowsGravatar Niklas Haas2016-11-01
| | | | | | | This allows us to define the tukey window (and other tapered windows). Also add a missing option definition for `wblur` while we're at it, to make testing out window-related stuff easier.
* vo: clear frame repeat flag when redrawingGravatar wm42016-11-01
| | | | | | This makes no sense, as the flag is supposed to be used for vsync purposes only (when literally outputting the screen again with no changes at all), and redrawing is often used for OSD updates.
* vo_opengl: make frame reupload logic more robustGravatar wm42016-11-01
| | | | | | | | | | It's not that easy to decide whether a frame needs to be reuploaded/rerendered. Using unique frame IDs for input makes it slightly easier and more robust. This also removes the use of video PTS in the interpolation path. This should also avoid reuploading the video frame if it's just redrawn in paused mode, or when using OSD/subtitles in cover art mode.
* vo_opengl_cb: fix a race conditionGravatar wm42016-10-30
| | | | | | | | | | When pthread_cond_timedwait(), the condition we are checking for could be true or false. This code assumed it was always false. This should be an extremely obscure race condition, since it can happen only if timeout and the condition changing sort of happen at the same time, or the lock is held for a longer time (which it normally isn't). But I could observe it a few times.
* vo_opengl_cb: fix inverted conditionGravatar wm42016-10-30
| | | | Commit e6291697 got this wrong.
* vo_opengl_cb: update current frame if a frame is droppedGravatar wm42016-10-30
| | | | | | | Even if a frame is dropped due to the libmpv API user not drawing a frame, it should be set as current frame. This avoids dropping a frame forever in certain circumstances such as cover art of the API user was stuck at initialization or such.
* vo_tct: support also 256 colors outputGravatar Avi Halachmi (:avih)2016-10-25
|
* vo_tct: optional custom size, support non-posix with 80x25 defaultGravatar Avi Halachmi (:avih)2016-10-25
| | | | Also, replace the UTF8 half block char at the source code with C escape.
* vo_opengl: context_rpi: fix stdatomic usageGravatar wm42016-10-21
| | | | | | atomic_bool is not supported with e.g. atomic_fetch_and. Fixes #3699. Untested.
* vo_opengl: partially re-enable glFlush() callsGravatar wm42016-10-21
| | | | | | | | | | | | It turns out the glFlush() call really helps in some cases, though only in audio timing mode (where we render, then wait for a while, then display the frame). Add a --opengl-early-flush=auto mode, which does exactly that. It's unclear whether this is fine on OSX (strange things going on there), but it should be. See #3670.
* vo: vo_tct is now available on non-POSIXGravatar wm42016-10-20
| | | | Fixes Windows build.
* build: don't rely on "__thread" being always available with GCCGravatar Dmitrij D. Czarkoff2016-10-20
| | | | | | | | | | | | | Thread-local storage in GCC is platform-specific, and some platforms that are otherwise perfectly capable of running mpv may lack TLS support in GCC. This change adds a test for GCC variant of TLS and relies on its result instead of assumption. Provided that LLVM's `__thread` support is similar to GCC, the test is called "GCC/LLVM TLS". Signed-off-by: wm4 <wm4@nowhere>
* opengl: compile against iOS OpenGLES implementationGravatar Aman Gupta2016-10-20
|
* vo_tct: introduce modern caca alternativeGravatar rr-2016-10-20
|
* vo_drm: change CLI options + refactorsGravatar rr-2016-10-07
| | | | | | | | | | - Change connector selection to accept human readable names (such as eDP-1, HDMI-A-2) rather than arbitrary numbers. - Change GPU selection to accept GPU number rather than device paths. - Merge connector and GPU selection into one --drm-connector. - Add support for --drm-connector=help. - Add support for --drm-* in EGL backend. - Refactor KMS; reduce state sharing across drm_common.
* vo_drm: fix segfault when using invalid cardGravatar rr-2016-10-06
|
* cocoa: add glFlush() to cocoa backendGravatar Akemi2016-10-06
| | | | | | | | | | | | The glFlush() call was made optional recently since it's not needed in most cases. On OSX though this is needed since we removed kCGLPFADoubleBuffer from the context creation, so the glFlush() call was added to the cocoa backend only. The CGLFlushDrawable() call can be safely removed since it only does something when a double buffered context is used. Also fixes a small typo. Fixes #3627.
* vo_opengl: apply --opengl-early-flush in dumb mode tooGravatar wm42016-10-05
| | | | | | | | In "dumb mode" (where most features are disabled and which only performs some basic rendering) we explicitly copy a set of whitelisted options, and leave all the other options at their default values. Add the new --opengl-early-flush option to this whitelist. Also remove an option field accidentally added in the commit adding --opengl-early-flush.
* vo_opengl_cb: don't wait for redrawn framesGravatar wm42016-10-05
| | | | | | | This also removes some extra waiting if no video is active, at least in theory. Also clarify the vo_frame flag comments for redraw/repeat.
* vo_opengl: disable glFlush() by default, and add an option to enable itGravatar wm42016-10-05
| | | | | | | | | | | It seems this can cause issues with certain platforms, so better to disable it by default. The original reason for this isn't overly justified, and display-sync mode should get rid of the need for it anyway. The new option is meant for testing, and will probably be removed if nobody comes up and reports that enabling the option actually improves anything.
* vo_opengl: hwdec_rpi: fix NULL pointer deref in certain casesGravatar wm42016-10-04
| | | | | If a client API user provides the MPGetNativeDisplay callback, but returns NULL for "MPV_RPI_WINDOW", this would crash.
* vo_drm: fix tiny memory leakGravatar rr-2016-10-04
|
* vo_drm: refactor getting display fpsGravatar rr-2016-10-04
| | | | | | | | Reduces code duplication between OpenGL backend and DRM VO. (The control() for OpenGL backend isn't sufficiently similar to the VO's control() to consider merging it as a whole - I extracted only the FPS code.)
* vo_opengl: minor simplificationGravatar wm42016-10-01
| | | | The extra gl_transform_trans() has no apparent use.
* vo_opengl: attempt to fix chroma offset under rotation and flippingGravatar wm42016-10-01
| | | | | | Other than being overly convoluted, this seems to make sense to me. Except that to get the "rot" transform I have to set flip=true, which makes no sense at all to me.
* vo_opengl: add debugging options for testing with padded texturesGravatar wm42016-10-01
|
* vo_opengl: partially fix dumb-mode cropping with rotationGravatar wm42016-09-30
| | | | | | | | | | | | Combining rotation and cropping didn't work. It was just completely broken. I'm still not sure if this is correct. Chroma positioning seems to be broken on rotation. There might also be a problem with non-mod-2 frame sizes. Still, strictly an improvement for both rotated and non-rotated rendering modes. Also, this could probably be written in a more elegant way.
* vo_opengl: vaegl: log more debugging infosGravatar wm42016-09-30
|
* vo_opengl: rpi: remove dumb commentGravatar wm42016-09-30
| | | | It's not even true anymore.
* vo_opengl: rpi: fix glaring memory leakGravatar wm42016-09-30
| | | | | This was in previously inactive code (uploading yuv420p), so it did not matter.
* vo_opengl: rpi: use overlay for yuv420p tooGravatar wm42016-09-30
| | | | | | | | | | | | | | | | The video code can deal fine with feeding software image formats to hwdec interop drivers. In RPI's case, this is preferable for performance, working around OpenGL bugs (see RPI firmware issue #666), and because OpenGL rendering doesn't bring too many advantages due to RPI supporting GLES 2.0 only. Maybe a way to force the normal video path is needed later. But currently, this can be tested by just not loading the hwdec interop driver. If you run command-line mpv and set --hwdec to something that does not load the RPI interop layer, you'll even have to use --hwdec-preload manually to get it enabled.
* vo_opengl: allow hwdec interops to support multiple image formatsGravatar wm42016-09-30
|
* vo_opengl: egl: print EGL errors only if not probingGravatar wm42016-09-30
| | | | | Avoids printing an error when trying to create a GLES 3.x context on a device which can do GLES 2.0 only.
* vo_opengl: rpi: raise the video layerGravatar wm42016-09-30
| | | | | | Was intended to put the GL layer above the standard console. (But actually that was done already, and the oddness I'm seeing seems to be an unrelated bug.)
* w32_common: implement VOCTRL_GET_DISPLAY_NAMESGravatar James Ross-Gowan2016-09-29
| | | | | | | | This should make display-names usable on Windows. It returns a list of GDI monitor names like "\\.\DISPLAY1". Since it may be useful to get the monitor that Windows considers associated with the window (with MonitorFromWindow,) this will always be returned as the first argument. This monitor is the one used for display-fps and icc-profile-auto.
* win32: build with -DINITGUIDGravatar James Ross-Gowan2016-09-28
| | | | | | | | | | | | We always want to use __declspec(selectany) to declare GUIDs, but manually including <initguid.h> in every file that used GUIDs was error-prone. Since all <initguid.h> does is define INITGUID and include <guiddef.h>, we can remove all references to <initguid.h> and just compile with -DINITGUID to get the same effect. Also, this partially reverts 622bcb0 by re-adding libuuid.a to the build, since apparently some GUIDs (such as GUID_NULL) are not declared in the source file, even when INITGUID is set.
* vo_opengl: deprecate 'drm-egl' backend and introduce 'drm' insteadGravatar wm42016-09-27
| | | | Just a name change. Requested.
* vo_drm: provide display fpsGravatar rr-2016-09-26
|
* cocoa: fix fullscreen regression on 10.11 and newerGravatar Akemi2016-09-26
| | | | Fixes #3364.
* vo_opengl: hwdec_cuda: get the cuda device from the GL contextGravatar Philip Langdale2016-09-24
| | | | | | | | | | Obviously, in the vast majority of cases, there's only one device in the system, but doing this means we're more likely to get a usable device in the multi-device case. cuda would support decoding on one device and displaying on another but the peer memory handling is not transparent and I have no way to test it so I can't really write it.
* vo_opengl: hwdec_cuda: directly map GL textures and skip using PBOsGravatar Philip Langdale2016-09-24
| | | | | | | | | | | | | | | | | | | The documentation around this stuff is poor, but I found an nvidia sample that demonstrates how to use the interop API most efficiently. (https://github.com/nvpro-samples/gl_cuda_interop_pingpong_st) Key lessons are: 1) you can register the texture itself and have cuda write to it, thereby skipping an additional copy through the PBO. 2) You don't have to be mapped when you do the copy - once you get a mapped pointer, it remains valid. Magic! This lets us throw out the PBOs as well as much of the explicit alignment and stride handling. CPU usage is slightly (~3%) lower for 4K content in one test case, so it makes a detectable difference, and presumably saves memory.
* vo_opengl: hwdec_rpi: remove copy&paste errorGravatar wm42016-09-23
|
* vo: log framedropsGravatar wm42016-09-23
| | | | Seems useful. (This was possibly added ages ago and then removed.)
* x11: fix external fullscreen updateGravatar wm42016-09-23
| | | | | | | | | | | | On x11, you can change the fullscreen via the window manager and without mpv's involvement. In these cases, the internal fullscreen flag has to be updated. The hack used for this didn't really work properly. Change it accordingly. The important thing is that the shadow copy of the option is updated. This is still not really ideal. Fixes #3570.