aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* 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
|
* video: move formatting of image parameters to separate functionGravatar wm42014-11-12
|
* vf: minor simplificationGravatar wm42014-11-12
| | | | | | | | Remove the extra vf_chain.output field - there's absolutely no need for it, because there is always a last filter which will buffer the output. For some reason, vf_chain.last was never set, which we now need to fix too.
* ao_lavc, vo_lavc: Fix crashes in case of multiple init attempts.Gravatar Rudolf Polzer2014-11-12
| | | | | | | | | | | | When initialization failed, vo_lavc may cause an irrecoverable state in the ffmpeg-related structs. Therefore, we reject additional initialization attempts at least until we know a better way to clean up the mess. ao_lavc currently cannot be initialized more than once, yet it's good to do consistent changes there as well. Also, clean up uninit-after-failure handling to be less spammy.
* vf_sub: fix previous commitGravatar wm42014-11-11
| | | | | | The previous fix breaks another obscure case: if the second vf_sub adds margins, the image is accidentally not extended, which would return in an assertion failure when returning the bogus image.
* vf_sub: don't crash if no subtitle context is availableGravatar wm42014-11-11
| | | | Happens with --vf=sub,sub (only the first one gets the context).
* encode: don't segfault when bailing out due to resolution changeGravatar wm42014-11-11
| | | | Somehow this code expects lastimg is always set.
* vo_opengl: don't reset user-set gamma when using vo_cmdlineGravatar wm42014-11-11
|
* video/out: minor simplification to event query functionGravatar wm42014-11-09
| | | | The "clear" parameter is confusing and useless.
* mp_image: check memory allocationGravatar wm42014-11-08
|
* w32_common: open window menu on Alt+SpaceGravatar James Ross-Gowan2014-11-08
| | | | | | Since mpv doesn't call TranslateMessage, this must be done manually. Should fix #1254
* Revert "w32_common: don't override alt+space"Gravatar wm42014-11-08
| | | | | | | | This reverts commit d859549424174179768fcd0310c75823a5ff7cb1. Going to apply the alternative fix through PR #1256, which came just some seconds after pushing the reverted commit. The reverted commit was reported as not actually working.
* w32_common: don't override alt+spaceGravatar wm42014-11-08
| | | | | | Apparently, stealing this from the WM is bad form, just like with F10. Fixes #1254.
* vo_opengl: initialize renderer after setting sizeGravatar wm42014-11-07
| | | | | | | | | | | This silences the warning: video/out/gl_video.c:1091:51: runtime error: division by zero when running with clang -fsanitize=undefined. Division by zero is legal according to IEEE, but I guess clang doesn't care about standard. While triggering this warning isn't actually avoided in all cases, it's avoided in the common case and also makes people shut up about it.
* vo/x11: implement VOCTRL_GET_DISPLAY_NAMES with xrandr names (e.g., "LVDS1")Gravatar Kevin Mitchell2014-11-07
| | | | | | | | XRRGetOutputInfo contains a "name" element which corresponds to to the display names given to the user by the "xrandr" command line utility. Copy it into the xrandr_display struct for each display. On VOCTRL_GET_DISPLAY_NAMES, send a copy of the names of the displays spanned by the mpv window on.
* vo_wayland: drop redundant "const"Gravatar wm42014-11-07
|
* vo_vaapi: fix broken error checksGravatar wm42014-11-07
|
* video: remove swapped-endian image format aliasesGravatar wm42014-11-05
| | | | | Like the previous commit, this removes names only, not actual support for these formats.
* vo_wayland: don't use endian-specific definesGravatar wm42014-11-05
| | | | | | | | | | | | Instead, use the native-endian alias, and switch the wayland format depending on the target platform's endian. This drops support for swapped-endian formats, but I think that is ok. Not only are the affected formats rather ancient and backwards, but using swapped formats probably does not make any sense for performance either. Untested.
* video: remove aliases for some rarely referenced image formatsGravatar wm42014-11-05
| | | | | | | | | These formats are still supported; you just can't reference them via a defined constants directly. They are now handled via the generic passthrough. (If you want to use such a format, you either have to add the entry back, or use AV_PIX_FMT_* directly.)
* video: add image format test programGravatar wm42014-11-05
|
* video: passthrough unknown AVPixelFormatsGravatar wm42014-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a rather radical change: instead of maintaining a whitelist of FFmpeg formats we support, we automatically support all formats. In general, a format which doesn't have an explicit IMGFMT_* name will be converted to a known format through libswscale, or will be handled by code which can treat pixel formats in a generic way using the pixel format description, like vo_opengl. AV_PIX_FMT_UYYVYY411 is a special-case. It's packed YUV with chroma subsampling by 4 in both directions. Its component order is documented as "Cb Y0 Y1 Cr Y2 Y3", meaning there's one UV sample for 4 Y samples. This means each pixel uses 1.5 bytes (4 pixels have 1 UV sample, so 4 bytes + 2 bytes). FFmpeg can actually handle this format with its generic mechanism in an extremely awkward way, but it doesn't work for us. Blacklist it, and hope no similar formats will be added in the future. Currently, the AV_PIX_FMT_*s allowed are limited to a numeric value of 500. More is not allowed, and there are some fixed size arrays that need to contain any possible format (look for IMGFMT_END dependencies). We could have this simpler by replacing IMGFMT_* with AV_PIX_FMT_* through the whole codebase. But for now, this is better, because we can compensate for formats missing in Libav or older FFmpeg versions, like AV_PIX_FMT_RGB0 and others.
* video: handle endian detection in a more generic wayGravatar wm42014-11-05
| | | | | | | | | | | | | FFmpeg has only a AV_PIX_FMT_FLAG_BE flag, not a LE one, which causes problems for us: we want to have the LE flag too, so code can actually detect whether a format is non-native endian. Basically, we want to reconstruct the LE/BE suffix all AV_PIX_FMT_*s have. Doing this is hard due to the (messed up) way AVPixFmtDescriptor works. The worst is AV_PIX_FMT_RGB444: this group of formats describe an endian-independent access (since no component actually spans 2 bytes, you only need byte accesses with a fixed offset), so we have to go through some pain.
* video: refuse to allocate image data for hwaccel formatsGravatar wm42014-11-05
| | | | Makes no sense.
* video: get hwaccel flag from pixdescGravatar wm42014-11-05
|
* vo_opengl: minimal EGL on X11 supportGravatar wm42014-11-04
| | | | | | Pretty useless and only good for testing. Does not include any form of GLES support.
* x11: rely on the Atom cacheGravatar wm42014-11-03
| | | | | XInternAtom() has a 64 entry hash table to avoid network accesses. Rely on this cache, instead of caching these manually.
* command: add window-minimized property (X11 only)Gravatar wm42014-11-02
| | | | | | More or less requested by #1237. Should be simple to extend this to other backends.
* command: make window-scale property observableGravatar wm42014-11-02
| | | | | | | | | | | | Add a generic mechanism to the VO to relay "extra" events from VO to player. Use it to notify the core of window resizes, which in turn will be used to mark all affected properties ("window-scale" in this case) as changed. (I refrained from hacking this as internal command into input_ctx, or to poll the state change, etc. - but in the end, maybe it would be best to actually pass the client API context directly to the places where events can happen.)
* cocoa: fix fullscreen delay when pausedGravatar Stefano Pigozzi2014-11-01
| | | | | | NSDisableScreenUpdates came to hunt me in the end and when mpv was paused, it did wait for a frame that never came (because of interaction with the live resizing code)!
* build: remove bundle support from wafGravatar Stefano Pigozzi2014-11-01
| | | | Use TOOLS/osxbundle.py instead. It's just better and less hacky.
* vo_opengl: draw OSD twice in 3D mode caseGravatar wm42014-10-29
| | | | | | | | | | | | | Apparently this is needed for correct 3D mode subtitles. In general, it seems you need to duplicate the whole "GUI", so it's done for all OSD elements. This doesn't handle the "duplication" of the mouse pointer. Instead, the mouse can be used for the top/left field only. Also, it's possible that we should "compress" the OSD in the direction it's duplicated, but I don't know about that. Fixes #1124, at least partially.
* cocoa: fix small leakGravatar Stefano Pigozzi2014-10-27
|