summaryrefslogtreecommitdiffstats
path: root/video
Commit message (Collapse)AuthorAgeFilesLines
* wayland: don't compute absurd window sizewm42015-01-251-3/+6
| | | | | | | | | For some reason, schedule_resize() can be called with everything set to 0. The code couldn't handle wl->window.aspect set to 0, converting NaNs to integers. Just work this around. (I have no idea what I'm doing. This is probably a corner case caused by my broken-ish wayland setup.)
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macroswm42015-01-254-10/+4
| | | | | | | | | Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code. Conflicts: video/out/w32_common.c waftools/checks/custom.py
* player: print used number of threads in verbose modewm42015-01-251-1/+1
| | | | Also, don't use av_log() for mpv output.
* vf_vapoursynth: fix Lua backendwm42015-01-251-0/+3
| | | | It couldn't handle the newly added float variable.
* vf_vapoursynth: pass through container FPS valuewm42015-01-252-0/+3
| | | | | | | | This is basically a hack; but apparently a needed one, since many vapoursynth filters insist on having a FPS set. We need to apply the FPS override before creating the filters. Also change some terminal output related to the FPS value.
* x11: make display-names property observablewm42015-01-251-0/+2
| | | | Reuse MP_EVENT_WIN_STATE for this.
* video: better pipelining with vf_vapoursynthwm42015-01-253-8/+73
| | | | | | | | | | Most of this is explained in the code comments. This change should improve performance with vapoursynth, especially if concurrent requests are used. This should change nothing if vf_vapoursynth is not in the filter chain, since non-threaded filters obviously can not asynchronously finish filtering of frames.
* gl_hwdec_vda: refuse to work with old OpenGL versionswm42015-01-251-0/+5
| | | | | | | | | | | | | | | 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). Conflicts: video/out/gl_hwdec_vda.c
* w32_common: allow window resizing with --no-borderJames Ross-Gowan2015-01-251-0/+58
| | | | | Conflicts: video/out/w32_common.c
* vo_opengl: Ignore approx-gamma for BT.2020-CLNiklas Haas2015-01-251-2/+9
| | | | | | 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.cStefano Pigozzi2015-01-253-17/+15
|
* Do not call strerror()wm42015-01-252-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | ...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.
* vo_opengl_old: fix OSD regressionwm42015-01-254-7/+17
| | | | | | | | | | | | | | | | | | | | 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. Conflicts: video/out/gl_osd.c
* vo_opengl: remove pointless glFinish callswm42015-01-252-5/+0
|
* x11: fix mysterious issue with window embedding on OpenBoxwm42015-01-251-1/+1
| | | | | | | | | | | | | | | | | | | 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: copy WinID optionwm42015-01-252-16/+22
| | | | For the purpose of making "--wid" setable at any time.
* vo_opengl: don't use 10 bit video on Intel GPUswm42015-01-252-0/+31
| | | | | | | | | | | | | | | | 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. Conflicts: video/out/gl_common.c video/out/gl_video.c
* vo_opengl: remove requirement for RG textureswm42015-01-254-41/+91
| | | | | | | | | | Features not supported are disabled (although with a misleading error message). Conflicts: video/out/gl_video.c video/out/vo_opengl.c video/out/vo_opengl_cb.c
* vo_opengl: never use 1D textures for lookup textureswm42015-01-252-48/+35
| | | | | | | | | 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 entrypointwm42015-01-251-67/+36
| | | | | | | | | 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.
* vo_opengl: extend filter size to 64wm42015-01-252-3/+9
| | | | | | For better downscaling. Maybe the list of filter sizes shouldn't be static...
* vo_opengl: extend filter size to 32wm42015-01-252-25/+25
| | | | | | 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.)
* gl_video: minor simplificationwm42015-01-251-4/+0
| | | | Not needed anymore.
* player: respect --untimed on last framewm42015-01-251-2/+1
| | | | | | | | | | | | | | The last video frame is another case that has a separate code path, although it's pretty similar to the one in commit 73e5aa87. Fix this in a different way, which also takes care of the last frame case, although without context the code becomes slightly more tricky. As further cleanup, move the decision about framedropping itself to the same place, so the check in vo.c becomes much simpler. The check for the vo->driver->encode flag, which is remvoed completely, was redundant too. Fixes #1480.
* image_writer: check for conversion errorswm42015-01-253-11/+17
| | | | | This can happen when e.g. a VO returns a screenshot in an unsupported format.
* x11: always use glXGetProcAddressARB()wm42015-01-251-1/+1
| | | | | | | | | | glXGetProcAddress() is outdated, and as far as I know doesn't give all the guarantees the "new" ARB function gives. Probably doesn't matter too much, because until now it always appeared to work. On the other hand, since this function is (bogusly) used only on the gl3 code path, it could have happened that users hit this, and just reverted to vo_opengl_old instead.
* video/out/win_state.c: fix --monitoraspectSoeren D. Schulze2015-01-251-1/+1
|
* x11: make display-names property stricterwm42015-01-251-1/+3
| | | | | | | | | | | | | | Returning the property before the window is mapped could lead to confusing behavior, and in particular strange differences between vo_vdpau and vo_opengl. (vo_opengl creates the window right at the start, while vdpau waits until the first reconfigure event.) It might even be possible that for vo_opengl random results were returned, because the hidden window can have different placement than the actual, final one on initial video reconfig. Fix this by returning the property only if the window is considered mapped. command.c handles this case specifically, and makes the property unavailable, instead of returning an empty list.
* command: make empty vf-metadata not an errorwm42015-01-251-3/+4
| | | | | | | | 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 entrypointwm42015-01-251-1/+1
| | | | | | | | This input command crashed: vf add @mf:format=yuv420p ; show_text "${vf-metadata/mf}" Fixes #1408.
* vo_opengl, x11: make legacy context warning not an errorwm42015-01-251-1/+1
| | | | | | 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.
* vo_opengl: fix broken rejection of extended scalingwm42015-01-251-3/+2
| | | | | Possibly explains why some users got mysterious FBO errors on crappy hardware.
* mp_image: reject invalid display aspect ratiowm42015-01-251-1/+1
| | | | | | | | | | Having any of these set to 0 makes no sense. I think some code might still be using 0/0 aspect ratio to signal unset aspect ratio, but I didn't find it. If there is still code like this, it should be fixed instead. Fixes #1467.
* gl_video.c: invalidate image_params in uninit_video()xylosper2015-01-251-0/+4
| | | | | | | | | | | | | When the given mp_image_params does not match with that of gl_video, gl_video_config() always calls uninit_video() but calls init_video() only if valid format is given. Since uninit_video() does not change image_params of gl_video, when the same params as the previous one is given to gl_video_config() after gl_video is unitialized with invalid format, gl_video_config() never calls init_video(). To prevent this, invalidate image_params of gl_video in uninit_video().
* dxva2: copy mp_image attributes to sw_imgJames Ross-Gowan2015-01-251-0/+1
|
* mp_image: copy missing attributesJames Ross-Gowan2015-01-251-0/+2
| | | | | This adds a couple of missing fields to mp_image_copy_attributes so things like rotation metadata work.
* cocoa: fix build on 10.9Stefano Pigozzi2015-01-251-1/+1
| | | | Use -isInFullScreenMode instead of the property introduced with the 10.10 SDK.
* cocoa: fix NSMapGet errorStefano Pigozzi2015-01-251-2/+4
| | | | regression from 64b6b2ea45
* cocoa: fix uninitialization while in fullscreenStefano Pigozzi2015-01-253-2/+36
| | | | | | | | 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
* screenshots: set AVFrame parameterswm42015-01-251-0/+3
| | | | | | | Currently, libavcodec is rather lenient, but it might get stricter in the future. Fixes #1398.
* cocoa: mark window for redraw after title changeStefano Pigozzi2015-01-141-1/+3
| | | | | | | This used to work correctly without the call to displayIfNeeded. I think this may only be needed for Yosemite. Fixes #1330
* vo_opengl: clamp filters to their sizewm42014-12-191-1/+2
| | | | | | | | | | | 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: don't change app activation policy in libmpvStefano Pigozzi2014-12-171-3/+4
| | | | /cc @mpv-player/stable
* vo_x11: don't attempt to resize when unconfiguredwm42014-12-171-2/+3
| | | | | | Fixes #1347. The previous commit actually fixes the crash.
* vo_x11: check allocation errorswm42014-12-171-3/+10
| | | | Avoids a crash if allocation fails.
* vd_lavc: fix error handling pathwm42014-12-171-11/+12
| | | | The ctx->pic check must uninitialize the decoder.
* mp_image: check for malloc failurewm42014-12-171-0/+2
| | | | | Or rather, the only reason av_buffer_create() can fail is a malloc failure.
* Check some mallocswm42014-12-171-0/+4
| | | | Fixes #1337.
* vo_opengl: fix linkage typewm42014-12-171-1/+1
| | | | Can happen on Windows, I suppose.
* vo_opengl: don't crash if framebuffers are not availablewm42014-12-171-0/+9
| | | | | | | | | | | In theory, vo_opengl supports operation without framebuffers. But this has been broken for a while now (commit cc00b3ff is a contender). It crashed because it unconditionally called gl->BindFramebuffer() (which is NULL if framebuffers are missing). Since this function is actually only called to set the default framebuffer, the simplest way to deal with this is to provide a dummy function, insteas of uglifying the code with additional if branches.
* w32_common: fix GUID linking in CygwinJames Ross-Gowan2014-12-171-0/+1
|
* cocoa: don't create Dock icon for audio only filesStefano Pigozzi2014-12-081-0/+21
| | | | fixes #635
* cocoa: don't async redraw when waiting for VO redrawStefano Pigozzi2014-12-071-1/+3
| | | | | This fixes the very annoying glitch where the black bars disappear for a single frame when going fullscreen.
* vo_opengl: Linearize non-RGB sRGB files correctly (eg. JPEG)Niklas Haas2014-12-013-7/+48
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: Reword comment in shaderNiklas Haas2014-12-011-2/+3
| | | | | 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 explicitwm42014-12-011-1/+2
| | | | More readable.
* vo_opengl: fix srgb with certain inputswm42014-12-011-1/+1
| | | | | | | | | 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: somethingwm42014-12-011-1/+1
| | | | | | Insert explanation here. Fixes #1023.
* vd_lavc: don't crash if codec could not be openedwm42014-12-011-1/+1
| | | | Fixes #1307.
* win32: add screen offset when handling overlarge windowswm42014-12-011-2/+2
| | | | | | | | | | | 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.
* cocoa: don’t hand over view memory ownership to libmpv clientsStefano Pigozzi2014-11-251-1/+1
|
* x11: fix crashwm42014-11-231-1/+1
| | | | Broken by previous commit. Oops.
* x11: fix crash with --wid=0 and vo_xv/vo_x11wm42014-11-231-2/+5
| | | | | | | But seriously, don't use --wid=0, don't use vo_xv, and _especially_ don't use vo_x11. Fixes #1284.
* Silence some Coverity warningswm42014-11-211-1/+1
| | | | None of this really matters.
* vd_lavc: flush frames before uninitializing hw decoderwm42014-11-201-0/+3
| | | | | | 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 itwm42014-11-181-5/+13
| | | | | | | | | | 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 downscalingwm42014-11-142-2/+6
|
*