aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
...
* wayland_common: adjust default cursor size and scale its bufferGravatar Rostislav Pehlivanov2017-10-10
| | | | | | | It turns out compositors which do scaling scale the cursor as well, so every single surface needs to get scaled too. Also, 32 corresponds to the default size for both GTK+ and KDE.
* vo: fix reference to mediacodec_embedGravatar Aman Gupta2017-10-09
|
* vo_gpu: android: fix gpu contextGravatar Aman Gupta2017-10-09
|
* vo_opengl: hwdec_vaegl: Use vaExportSurfaceHandle() if presentGravatar Mark Thompson2017-10-09
| | | | | | | | | | | This new interface in libva2 offers a cleaner way to export surfaces which can then be imported to EGL. In particular, this works with the Mesa driver, so we can have proper playback without a pointless download and upload on AMD cards. This change does nothing with libva1, and will fall back to the libva1 interface (vaDeriveImage() + vaAcquireBufferHandle()) if vaExportSurfaceHandle() is not present.
* vaapi: Use libva2 message callbacksGravatar Mark Thompson2017-10-09
| | | | They are no longer global, so they work vaguely sensibly.
* vo_gpu: simplify opengl aliasGravatar wm42017-10-09
| | | | | This makes the replacement warning message worse, but I don't think I care enough.
* vo_gpu: remove duplicated optionsGravatar wm42017-10-09
| | | | | All these options (like --gpu-context etc.) were duplicated. It's amazing that it didn't cause more problems than it did.
* vo_opengl: context_drm_egl: Don't create a new framebuffer for every frameGravatar Mark Thompson2017-10-09
|
* vo_gpu: add android opengl backendGravatar Aman Gupta2017-10-09
| | | | | | | | | | At the moment, rendering on Android requires ``--vo=opengl-cb`` and a lot of java<->c++ bridging code to receive the receive and react to the render callback in java. Performance also suffers with opengl-cb, due to the overhead of context switching in JNI. With this patch, Android can render using ``--vo=gpu --gpu-context=android`` (after setting ``--wid`` to point to an android.view.Surface on-screen).
* vo: add mediacodec_embed output driverGravatar Aman Gupta2017-10-09
| | | | | Allows rendering IMGFMT_MEDIACODEC frames directly onto an android.view.Surface
* hwdec: add mediacodec hardware decoder for IMGFMT_MEDIACODEC framesGravatar Aman Gupta2017-10-09
|
* vo: add VO_CAP_NOREDRAW for upcoming vo_mediacodec_embedGravatar Aman Gupta2017-10-09
| | | | | | | | | | | MediaCodec uses a fixed number of output buffers to hold frames, and expects that output buffers will be released as soon as possible. Once rendered, the underlying frame is automatically released and cannot be reused or rerendered. The new VO_CAP_NOREDRAW forces mpv to release frames immediately after they are rendered or dropped, to ensure that MediaCodec decoder does not run out of buffers and stall out.
* hwdec: rename mediacodec to mediacodec-copyGravatar Aman Gupta2017-10-09
|
* img_format: AV_PIX_FMT_PAL8 is RGBGravatar wm42017-10-09
| | | | | | | | | | | | | | | | | This partiular format is not marked as AV_PIX_FMT_FLAG_RGB in FFmpeg's pixdesc table, so mpv assumed it's a YUV format. This is a regression, since the old code in mp_imgfmt_get_desc() also treated this format specially to avoid this problem. Another format which was special-cased in the old code was AV_PIX_FMT_MONOBLACK, so make an exception for it as well. Maybe this problem could be avoided by mp_image_params_guess_csp() not forcing certain colorimetric parameters by the implied colorspace, but certainly that would cause other problems. At least there are mistagged files out there that would break. (Do we actually care?) Fixes #4965.
* wayland_common: implement output tracking, cleanups and bugfixesGravatar Rostislav Pehlivanov2017-10-09
| | | | | | | | | | | | | | | | | | This commit: - Implements output tracking (e.g. monitor plug/unplug) - Creates the surface during registry (no other dependencies) - Queues the callback immediately after surface creation - Cleaner and better event handling (functions return directly) - Better reconfigure handling (resizes reduced to 1 during init) - Don't unnecessarily resize (if dimensions match) Apart from that fixes 2 potential memory leaks (mime type and window title), 2 string ownership issues (output name and make need to be dup'd), fixes some style issues (switches were indented) and finally adds messages when disabling/enabling idle inhibition. The callback setter function was removed in preparation for the commit which will use the frame event cb because it was unnecessary.
* wayland_common: allow vo_wayland_uninit(NULL)Gravatar Niklas Haas2017-10-07
| | | | ...again
* Revert "wayland_common: add support for embedding"Gravatar Rostislav Pehlivanov2017-10-05
| | | | This reverts commit 8d8d4c5cb1b3553215a8ba547d4db463fdc88831.
* wayland_common: respect close eventsGravatar Rostislav Pehlivanov2017-10-05
| | | | | Overlooked. Also add a comment and only set the parent if WinID is set.
* wayland_common: add support for embeddingGravatar Rostislav Pehlivanov2017-10-05
|
* wayland_common: reset the LIVE_RESIZING flag when resizing endsGravatar Rostislav Pehlivanov2017-10-05
| | | | | | The VO code resets each flag individually, and it doesn't do it for this one. Also make the prints use the struct names rather than the hardcoded ones, forgot to add those to the last wayland_common commit.
* build: switch preliminary LGPL mode from v3 to v2.1Gravatar wm42017-10-05
| | | | | | | | | | | iive agreed to relicense things that are still in mpv to LGPLv2.1. So change the licenses of the affected files, and rename the configure switch for LGPL mode to --enable-preliminary-lgpl2. (The "preliminary" part will probably be removed from the configure switch soon as well.) Also player/main.c hasn't had GPL parts since a few commits ago.
* wayland_common: don't hardcode protocol names during registryGravatar Rostislav Pehlivanov2017-10-04
| | | | Use the interface names from the wl_interface structs they provide.
* wayland_common: rewrite from scratchGravatar Rostislav Pehlivanov2017-10-03
| | | | | | | | | | | | The wayland code was written more than 4 years ago when wayland wasn't even at version 1.0. This commit rewrites everything in a more modern way, switches to using the new xdg v6 shell interface which solves a lot of bugs and makes mpv tiling-friedly, adds support for drag and drop, adds support for touchscreens, adds support for KDE's server decorations protocol, and finally adds support for the new idle-inhibitor protocol. It does not yet use the frame callback as a main rendering loop driver, this will happen with a later commit.
* vo_wayland: removeGravatar Rostislav Pehlivanov2017-10-03
| | | | | This VO was buggy and never worked correctly. Like with wayland_common, it needs to be rewritten from scratch.
* vo_gpu: gl: implement proper extension string searchGravatar wm42017-10-02
| | | | | | | The existing code in check_ext() avoided false positive due to sub-strings, but allowed false negatives. Fix this with slightly better search code, and make it available as function to other source files. (There are some cases of strstr() still around.)
* vo_gpu: enable 3DLUTs in dumb modeGravatar Niklas Haas2017-09-30
| | | | | | Unless FBOs are unsupported, this works. In particular, it's required to get ICC profiles working in voluntary dumb mode. So instead of blanket-disabling it, only disable it in the !have_fbo false case.
* vf_vavpp: restrict allowed sw upload formats to nv12/yuv420pGravatar wm42017-09-30
| | | | | | | | | | | | | | | | | | | | We allowed any input format that was generally supported by libva, but this is probably nonsense, as the actual surface format was always fixed to nv12. We would have to check whether libva can upload a given pixel format to a nv12 surface. Or we would have to use a separate frame pool for input surfaces with the exact sw_format - but then we'd also need to check whether the vaapi VideoProc supports the surface type. Hardcode nv12 and yuv420p as input formats, which we know can be uploaded to nv12 surfaces. In theory we could get a list of supported upload formats from libavutil, but that also require allocating a dummy hw frames context just for the query. Add a comment to the upload code why we can allocate an output surface for input. In the long run, we'll probably want to use libavfilter's vaapi deinterlacer, but for now this would break at least user options.
* vaapi: replace error macro implementationGravatar wm42017-09-30
| | | | | | | | | | The current check_va_status() function could probably be argued to be derived from the original VAAPI's patch check_status() function, thus GPL-only. While I have my doubts that it applies to an idiom on this level, it's better to replace it. Similar idea, different expression equals no copyright association. An earlier commit message promised this, but it was forgotten.
* video: fix green shitGravatar wm42017-09-30
|
* vaapi: change license to LGPLGravatar wm42017-09-29
| | | | | | | | | | | | | | | | | | | | | | Originally mpv vaapi support was based on the MPlayer-vaapi patches. These were never merged in upstream MPlayer. The license headers indicated they were GPL-only. Although the actual author agreed to relicensing, the company employing him to write this code did not, so the original code is unusable to us. Fortunately, vaapi support was refactored and rewritten several times, meaning little code is actually left. The previous commits removed or moved that to GPL-only code. Namely, vo_vaapi.c remains GPL-only. The other code went away or became unnecessary mainly because libavcodec itself gained the ability to manage the hw decoder, and libavutil provides code to manage vaapi surfaces. We also changed to mainly using EGL interop, making any of the old rendering code unnecessary. hwdec_vaglx.c is still GPL. It's possibly relicensable, because much of it was changed, but I'm not too sure and further investigation would be required. Also, this has been disabled by default for a while now, so bothering with this is a waste of time. This commit simply disables it at compile time as well in LGPL mode.
* vaapi: move legacy code to vo_vaapi.cGravatar wm42017-09-29
| | | | | | Done for license reasons. vo_vaapi.c is turned into some kind of dumpster fire, and we'll remove it as soon as I'm mentally ready for unkind users to complain about removal of this old POS.
* vf_vavpp: use error checking macroGravatar wm42017-09-29
|
* vf_vavpp: use libavutil hw frames API for frame pool and uploadGravatar wm42017-09-29
| | | | | Another step to get rid of the legacy crap in vaapi.c. (Most is still kept, because it's in use by vo_vaapi.c.)
* vaapi: use newer libavutil vaapi pixfmt nameGravatar wm42017-09-29
| | | | | AV_PIX_FMT_VAAPI_VLD is clearly deprecated - it just doesn't raise any compiler warnings.
* vaapi: minor changesGravatar wm42017-09-29
| | | | | | | | | | | | This is for relicensing. Some of this code is loosely based on vo_vaapi.c from the original MPlayer-vaapi patches. Most of the code has changed, and only the initialization code and check_status() look remotely similar. The initialization code is changed to be like Libav's (hwcontext_vaapi.c). check_va_status() is just a C idiom, but to play it safe, we'll either drop it from LGPL code (or recreate it). vaapi.c still contains plenty of code from the original patches, but the next commits will move them out of the LGPL code paths.
* vo_gpu: vulkan: reword commentGravatar Niklas Haas2017-09-29
| | | | | This is fixed upstream (and we now know it's a driver bug) so reword the comment.
* vo_gpu: force layout std430 for PCsGravatar Niklas Haas2017-09-29
| | | | | | | | Seems to be fixed upstream in the nvidia driver, so it's probably a good idea to 1. force the layout and 2. remove the warning, as it now actually works. Users with older drivers would run into errors, but they can still use shaderc as a replacement. (And it's not like the old status quo was any better)
* vo_gpu: fix --opengl-gamma redirectGravatar Niklas Haas2017-09-28
| | | | | It still pointed at --gpu-gamma, but we decided on --gamma-factor instead.
* vo_gpu: set the correct number of vertex attribsGravatar Niklas Haas2017-09-28
| | | | | | | This was always set to the length of the VAO, but it should have been set to the number of vertex attribs actually in use for this frame. No idea how that managed to survive the test framework on nvidia/linux, but ANGLE caught it.
* vo_gpu: vulkan: add support for WindowsGravatar James Ross-Gowan2017-09-28
|
* vo_gpu: make the vertex attribs dynamicGravatar Niklas Haas2017-09-28
| | | | | | | | | | | | | | | | This has several advantages: 1. no more redundant texcoords when we don't need them 2. no more arbitrary limit on how many textures we can bind 3. (that extends to user shaders as well) 4. no more arbitrary limits on tscale radius To realize this, the VAO was moved from a hacky stateful approach (gl_sc_set_vertex_attribs) - which always bothered me since it was required for compute shaders as well even though they ignored it - to be a proper parameter of gl_sc_dispatch_draw, and internally plumbed into gl_sc_generate, which will make a (properly mangled) deep copy into params.vertex_attribs.
* vo_gpu: kill some static arraysGravatar Niklas Haas2017-09-28
| | | | | This gets rid of the hard-coded limits on the number of hooks, textures and hook points.
* vo_gpu: vulkan: indent queue family enumerationGravatar Niklas Haas2017-09-27
| | | | Consistency
* vo_gpu: vulkan: normalize use of *Flags and *FlagBitsGravatar Niklas Haas2017-09-27
| | | | | | | | | | | | FlagBits is just the name of the enum. The actual data type representing a combination of these flags follows the *Flags convention. (The relevant difference is that the latter is defined to be uint32_t instead of left implicit) For consistency, use *Flags everywhere instead of randomly switching between *Flags and *FlagBits. Also fix a wrong type name on `stageFlags`, pointed out by @atomnuker
* vo_gpu: vulkan: optimize redundant pipeline barriersGravatar Niklas Haas2017-09-26
| | | | | | | | | | | | | | | Using renderpass layout transitions is more optimal and doesn't require a redundant pipeline barrier. Since our render passes are static and don't change throughout the lifetime of a ra_renderpass, we unfortunately don't have much flexibility here - so just hard-code SHADER_READ_ONLY_OPTIMAL as the output format as this will be the most common case. We also can't short-circuit the transition when we need to preserve the framebuffer contents, since that depends on the current layout; so we still use an explicit tex_barrier in this case. (Most optimal for this scenario would be an input attachment anyway)
* vd_lavc: cuda requires setting hw_device_ctxGravatar wm42017-09-26
| | | | | | This restores cuda/cuvid under Windows. Cuvid is relatively useless under Windows, but this was requested.
* video: remove old videotoolbox supportGravatar wm42017-09-26
| | | | | Like as in previous commits, you need a very recent FFmpeg (probably git master).
* video: drop old D3D11/DXVA2 supportGravatar wm42017-09-26
| | | | | | | | | Now you need FFmpeg git, or something. This also gets rid of the last real use of gpu_memcpy(). libavutil does that itself. (vaapi.c still used it, but it was essentially unused, because the code path isn't really in use anymore. It wasn't even included due to the d3d-hwaccel dependency in wscript.)
* video: drop old cuda/cuvid hwaccelGravatar wm42017-09-26
| | | | Just use FFmpeg 3.3 (or whatever it was) to get Cuvid support.
* vo_gpu: fix memleak in spirv.cGravatar Niklas Haas2017-09-26
|