aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
...
* vo_opengl: refactor: instantiate scaler functions at runtimeGravatar wm42014-12-08
| | | | | | | | | | | | | | | | | Before this commit, the convolution scaler shader functions were pre- instantiated in the shader file. For every filter size, a corresponding function (with the filter size as suffix) had to be present. Change this, and make the C code emit the necessary bits. This means the shader code is much reduced. (Although hopefully it doesn't make shader compilation faster - it would require a really dumb compiler if it spends its time on dead code.) It also makes it more flexible, which is the main goal. The DEF_SCALER0 stuff is needed because the C code writes the header of the shader, at a point where scaler macros are not defined yet.
* vo_opengl: never use 1D textures for lookup texturesGravatar wm42014-12-08
| | | | | | | | | This was a microoptimization for small filters which need 4 or less weights per sample point. When I originally wrote this code, using a 1D texture seemed to give a slight speed gain, but now I couldn't measure any difference. Remove this to simplify the code.
* vo_opengl: refactor: merge convolution function and sampler entrypointGravatar wm42014-12-08
| | | | | | | | | There's not much of a reason to have the actual convolution code in a separate function. Merging them actually simplifies the code a bit, and gets rid of the repetitious macro invocations to define the functions for each filter size. There should be no changes in behavior or output.
* w32_common: ensure taskbar is hidden when fullscreenGravatar James Ross-Gowan2014-12-08
| | | | | | | | | | | | | | | Windows uses a heuristic to determine if a window should appear fullscreen. If the active window's client area covers the whole screen, the taskbar should move to the bottom of the Z-order, allowing the window to show through. Unfortunately, sometimes it doesn't work and the taskbar stays on top of the "fullscreen" window. ITaskbarList2->MarkFullscreenWindow explicitly tells the shell that a window wants to be fullscreen, so the taskbar is always at the bottom of the Z-order while the marked window is active. This might help with #999. Firefox also uses this interface to fix fullscreen issues.
* vo_opengl: extend filter size to 64Gravatar wm42014-12-06
| | | | | | For better downscaling. Maybe the list of filter sizes shouldn't be static...
* vo_opengl: clamp filters to their sizeGravatar wm42014-12-06
| | | | | | | | | | | This gives better results with fancy-downscaling. The issue here is that fancy-downscalign "extends" the filter radius by some amount, which requires using a larger filter size and shader. Then most of the filter is "unused", but some filters still return non-0 coefficients, which create heavy artifacts. Just clamp them off. I'm not sure if this is the right solution, but at least it's better than before.
* cocoa: fix view leak in uninit when fullscreenGravatar Stefano Pigozzi2014-12-06
|
* cocoa: use --idle when running inside bundleGravatar Stefano Pigozzi2014-12-06
| | | | | Previously when using the bundle we used a custom bizarro thing to wait for events. Just use `--idle` and greatly simplify the code.
* cocoa: don't change app activation policy in libmpvGravatar Stefano Pigozzi2014-12-06
| | | /cc @mpv-player/stable
* vo_opengl: disable fancy-downscaling for opengl-hq againGravatar wm42014-12-06
| | | | | Seems it's actually buggy, beyond the problem that large filter sizes are required.
* vo_opengl: extend filter size to 32Gravatar wm42014-12-06
| | | | | | Also replace the weights calculations for 8/12/16 with the generic weight function definition macro. (The weights 2/4/6 follow slightly different rules.)
* vaapi/GLX: remove a direct reference to an GL symbolGravatar wm42014-12-06
| | | | Instead go through our function loader.
* cocoa: don't create Dock icon for audio only filesGravatar Stefano Pigozzi2014-12-05
| | | | fixes #635
* cocoa: don't async redraw when waiting for VO redrawGravatar Stefano Pigozzi2014-12-04
| | | | | This fixes the very annoying glitch where the black bars disappear for a single frame when going fullscreen.
* video: remove things forgotten in previous commitGravatar wm42014-12-03
| | | | Oops.
* video: remove internal QP passingGravatar wm42014-12-03
| | | | | | | | | | | This was required by vf_pp, which was just removed. vf_dlopen has this stuff in its API. This API is considered stable, so the related fields are not removed from it. But the fields are always 0 now, so there's no point in keeping the example program around. vf_pullup.c did some extremely awkward passthrough of this information, but didn't actually use it.
* video/filter: kill vf_pp (libpostproc)Gravatar wm42014-12-03
| | | | | | | | | This is an ancient filter, and we assume it's not useful anymore. If you really want this, it's still available in libavfilter (e.g. via --vf=lavfi=[pp...]). The disadvantage is that mpv doesn't pass through QP information to libavfilter. (This was probably the reason vf_pp still was part of mpv - it was slightly easier to pass QP internally.)
* vo_opengl: make uninit idempotentGravatar wm42014-12-03
|
* vo_opengl: move hwdec parts into their own filesGravatar wm42014-12-03
| | | | | | This wasn't done before because there was no advantage in "abstracting" it. This changed, and putting this into its own files is better than messing it into gl_common.c/h.
* vdpau/GLX: don't access VO backendGravatar wm42014-12-03
| | | | | | | | | Same as with the previous commits. In theory, vdpau/x11 GL interop doesn't assume GLX. It could use EGL as well. But since it's always GLX in practice, so we're fine with this. Remove the gl_hwdec.mpgl field - it's unused now.
* vaapi/GLX: don't access VO backendGravatar wm42014-12-03
| | | | Same as with the VDA change.
* vda: make independent from cocoa backendGravatar wm42014-12-03
| | | | | | | | | Basically, don't access the vo field. There's also no reason anymore to access MPGLContext. We still need to access loaded GL functions though, so add a field for that to gl_hwdec. Untested.
* vda: use implicit current GL contextGravatar Stefano Pigozzi2014-12-03
| | | | Removes the dependency from the Cocoa backend in case we are not using it but still wanna use VDA GL introp.
* vo_opengl: minor changesGravatar wm42014-12-02
| | | | | | | | | | | | | | Always set the viewport on entry. The way the viewport is tracked is a bit complicated in my opinion, and in fact it doesn't even reduce the number of GL calls. Setting it on entry is actually redundant if video covers the screen fully, because the handle_pass() unconditionally sets it anyway, but avoiding it would complicate the cases gl->Clear() is actually needed. Add a fbo argument to gl_video_render_frame(). This allows you to render into a FBO rather than the default framebuffer. It will be useful for providing an API to render on an external GL context. (If that will actually be added.)
* vo_opengl: print error number if framebuffer creation failsGravatar wm42014-12-02
| | | | | | | | Seems like a waste not to print this. Anyone with enough technical knowledge to have use for the exact error can map the number back to the GL symbol, so don't bother to convert it to a symbol.
* vd_lavc: use avcodec_is_open()Gravatar wm42014-12-02
| | | | | This is "better", although nobody seems to know how this API is supposed to work at all.
* cocoa: allow to black out other display when going fsGravatar Stefano Pigozzi2014-12-01
| | | fixes #1302
* vo_opengl: remove redundant GL state initializationGravatar wm42014-12-01
| | | | | | | All of these are already the defaults. One exception is glDepthMask(), which is enabled by default. But if the framebuffer has no depth buffer anyway, it shouldn't make a difference.
* vd_lavc: don't crash if codec could not be openedGravatar wm42014-12-01
| | | | Fixes #1307.
* vo_wayland: Add "multimedia" keyboard key bindings.Gravatar Sergey Kvachonok2014-11-29
| | | | | | | | libxkbcommon keysyms are the same as X11 keysyms (sans prefix), so I simply copied the missing subsection from x11_common.c. Signed-off-by: Sergey Kvachonok <ravenexp@gmail.com> Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: enable fancy-downscaling by default for opengl-hqGravatar wm42014-11-29
|
* vo_opengl: disable fancy-downscaling for anamorphic videoGravatar wm42014-11-29
| | | | Includes some arbitrary minor refactoring.
* win32: add screen offset when handling overlarge windowsGravatar wm42014-11-28
| | | | | | | | | | | MS Windows doesn't allow windows larger than the screen, so we include a hack to make the window smaller. This hack recenters the window (what else would it do?). It didn't account for the virtual offset of the current screen, and it was reported that it forces the window to the first screen. Should fix #1292.
* vo_direct3d: check whether D3DFMT_A8 is availableGravatar wm42014-11-27
| | | | | | | | I suspect this is what is happening in github issue #1265 (at least partially). If D3DFMT_A8 is not available, fall back to RGBA. This is less efficient in general, so we normally want to avoid it.
* gl_video: minor simplificationGravatar wm42014-11-27
| | | | Not needed anymore.
* vo_opengl: Linearize non-RGB sRGB files correctly (eg. JPEG)Gravatar Niklas Haas2014-11-26
| | | | Signed-off-by: wm4 <wm4@nowhere>
* Do not call strerror()Gravatar wm42014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | ...because everything is terrible. strerror() is not documented as having to be thread-safe by POSIX and C11. (Which is pretty much bullshit, because both mandate threads and some form of thread-local storage - so there's no excuse why implementation couldn't implement this in a thread-safe way. Especially with C11 this is ridiculous, because there is no way to use threads and convert error numbers to strings at the same time!) Since we heavily use threads now, we should avoid unsafe functions like strerror(). strerror_r() is in POSIX, but GNU/glibc deliberately fucks it up and gives the function different semantics than the POSIX one. It's a bit of work to convince this piece of shit to expose the POSIX standard function, and not the messed up GNU one. strerror_l() is also in POSIX, but only since the 2008 standard, and thus is not widespread. The solution is using avlibc (libavutil, by its official name), which handles the unportable details for us, mostly. We avoid some pain.
* gl_common: factor context creationGravatar wm42014-11-26
| | | | | | | Always create the context in mpgl_init(), instead of doing it when mpgl_config_window() is called the first time. This is a small step towards cleaning up the GL backend interface, and adding other things like perhaps GLES support, or a callback-driven backend for libmpv.
* vo_opengl: Reword comment in shaderGravatar Niklas Haas2014-11-26
| | | | | I didn't quite understand this comment after looking at the code again months later, so I reworded it for better clarity.
* vo_opengl: make operator precedence explicitGravatar wm42014-11-26
| | | | More readable.
* vo_opengl: fix srgb with certain inputsGravatar wm42014-11-26
| | | | | | | | | Sampling from the source texture and scaling must always be done separately in this mode. Fix suggested by haasn. Still looks a bit wrong, though.
* vo_opengl: somethingGravatar wm42014-11-26
| | | | | | Insert explanation here. Fixes #1023.
* cocoa: don’t hand over view memory ownership to libmpv clientsGravatar Stefano Pigozzi2014-11-25
|
* x11: fix crashGravatar wm42014-11-23
| | | | Broken by previous commit. Oops.
* x11: fix crash with --wid=0 and vo_xv/vo_x11Gravatar wm42014-11-23
| | | | | | | But seriously, don't use --wid=0, don't use vo_xv, and _especially_ don't use vo_x11. Fixes #1284.
* Silence some Coverity warningsGravatar wm42014-11-21
| | | | None of this really matters.
* vd_lavc: flush frames before uninitializing hw decoderGravatar wm42014-11-20
| | | | | | This way, no surfaces are in use when uninitializing the hw decoders, which might help with -copy hw decoders (normal hw decoding is not affected).
* vo_direct3d: fix texture-memory sub-option, extend itGravatar wm42014-11-18
| | | | | | | | | | This sub-option was turned into a flag when the sub-option parser was changed to the generic one (probably accidentally). Turn it into a proper choice-option. Also, adjust what the options do. Though none of this probably makes much sense; the default should work, and if it doesn't, the GPU/driver is probably beyond help.
* vo_opengl: allow setting different filters for downscalingGravatar wm42014-11-14
|
* mp_image: slightly better image params verbose infoGravatar wm42014-11-12
|