aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* vf_format: by default, pass through video without changeGravatar wm42015-03-31
| | | | | | Instead of forcing a useless format (packed YUV??) by default. Also cleanup.
* csputils: unify names for colorspace/etc. namesGravatar wm42015-03-31
|
* RPI supportGravatar wm42015-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires FFmpeg git master for accelerated hardware decoding. Keep in mind that FFmpeg must be compiled with --enable-mmal. Libav will also work. Most things work. Screenshots don't work with accelerated/opaque decoding (except using full window screenshot mode). Subtitles are very slow - even simple but huge overlays can cause frame drops. This always uses fullscreen mode. It uses dispmanx and mmal directly, and there are no window managers or anything on this level. vo_opengl also kind of works, but is pretty useless and slow. It can't use opaque hardware decoding (copy back can be used by forcing the option --vd=lavc:h264_mmal). Keep in mind that the dispmanx backend is preferred over the X11 ones in case you're trying on X11; but X11 is even more useless on RPI. This doesn't correctly reject extended h264 profiles and thus doesn't fallback to software decoding. The hw supports only up to the high profile, and will e.g. return garbage for Hi10P video. This sets a precedent of enabling hw decoding by default, but only if RPI support is compiled (which most hopefully it will be disabled on desktop Linux platforms). While it's more or less required to use hw decoding on the weak RPI, it causes more problems than it solves on real platforms (Linux has the Intel GPU problem, OSX still has some cases with broken decoding.) So I can live with this compromise of having different defaults depending on the platform. Raspberry Pi 2 is required. This wasn't tested on the original RPI, though at least decoding itself seems to work (but full playback was not tested).
* vo_opengl: treat non-blended subtitles as sRGBGravatar Niklas Haas2015-03-27
| | | | | | | | Currently, the code just skipped CMS completely. This commit treats them as sRGB by default, instead. This also refactors much of the color management code to make it more generalized and re-usable.
* vo_opengl: add FBOTEX_FUZZY aliasGravatar Niklas Haas2015-03-26
| | | | Minor reusability factor
* vo_opengl: simplify sampler preludeGravatar Niklas Haas2015-03-26
| | | | | This moves common re-definitions to a custom function and also shortens the names to make stuff less verbose in general.
* vo_opengl: reset surfaces on equalizer updatesGravatar Niklas Haas2015-03-26
| | | | | This makes the VO more responsive to equalizer changes (eg. brightness) when interpolation is used.
* vo_opengl: increase shader cache sizeGravatar Niklas Haas2015-03-26
| | | | | | | This is a minor precaution, because in some cases the number of shader programs can already hit 10. (chroma merging + separated cscale/scale + + sub blending (interpolated) + sub blending (non-interpolated) + output (interpolated) + output (non-interpolated) + OSD)
* vo_opengl: draw subtitles directly onto the videoGravatar Niklas Haas2015-03-26
| | | | | | | | | | | | | | | | This has a number of user-visible changes: 1. A new flag blend-subtitles (default on for opengl-hq) to control this behavior. 2. The OSD itself will not be color managed or affected by gamma controls. To get subtitle CMS/gamma, blend-subtitles must be used. 3. When enabled, this will make subtitles be cleanly interpolated by :interpolation, and also dithered etc. (just like the normal output). Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: set cscale=spline36 as default for opengl-hqGravatar Niklas Haas2015-03-25
| | | | | | | Bilinear scaling is not a suitable default for something named "hq"; the whole reason this was done in the past was because cscale used to be obscenely slow. This is no longer the case, with cscale being nearly free.
* vo_opengl: correct OSD PTS when using interpolationGravatar Niklas Haas2015-03-25
|
* vf_vapoursynth: handle approximate EOF drainingGravatar wm42015-03-25
| | | | | | | | | | | | | Handling this perfectly with VapourSynth is probably not possible: you either need to tell it the total number of input frames in advance, or deliver an infinite stream. With playback, EOF can happen at an unpredictable point, for which the VapourSynth API has no mechanism at all. We handle EOF by returning an error to the filter, which will the filter return all pending frame callbacks. We still can try to handle it approximately: if the filter requests a frame past EOF, then send it an error. This seems to work relatively well with filters which don't request future frames.
* vo_opengl: minor simplificationGravatar wm42015-03-25
| | | | We don't need alternative function names in the GL loader anymore.
* vo_opengl: check extensions properlyGravatar wm42015-03-25
| | | | | | | | | With the previous commit, we have no need anymore to check a part of an extension string (for ignoring a prefix). So check the extension string properly, instead of just using the broken old strstr() method, which could accidentally ignore prefixes or suffixes. Do this by extending the check to whether the extension name is properly delimited by spaces or string start/end.
* vo_opengl: cleanup swap_control extension loadingGravatar wm42015-03-25
| | | | | | | | | | | | | | | | Instead of somehow looking for the substring "_swap_control" and trying to several arbitrary function names, do it cleanly. The old approach has the problem that it's not very exact, and may even load a pointer to a function which doesn't exist. (Some GL implementations like Mesa return function pointers even the functions which don't exist, and calling them crashes.) I couldn't find any evidence that glXSwapInterval, wglSwapIntervalSGI, or wglSwapInterval actually exist, so don't include them. They were carried over from MPlayer times. To make diagnostics easier, print a warning in verbose mode if the function could not be loaded.
* vo_opengl: drop support for old framebuffer extensionGravatar wm42015-03-25
| | | | | | | | Drop support for GL_EXT_framebuffer_object. It has 2 problems: semantics might be slightly different from the "proper" GL_ARB_framebuffer_object extension (but is likely completely untested), and also our extension loader is too dumb to load the same group of function pointers represented by different extensions only once.
* vo_wayland: fix null dereferenceGravatar Jari Vetoniemi2015-03-23
| | | | | If compositor sends configure event before back_buffer is allocated, it will cause null dereference.
* vo_opengl: do not block on waylandGravatar Jari Vetoniemi2015-03-23
| | | | | | | | | When not receiving frame callbacks, we should not draw anything to avoid blocking the OpenGL renderer. We do this by extending gl context api, by introducing new optional function 'is_active', that indicates whether OpenGL renderers should draw or not. This fixes issue #249.
* vo_wayland: define opaque regionGravatar Jari Vetoniemi2015-03-23
| | | | | This allows compositor to optimize rendering, as it will know mpv is not transparent.
* vo_wayland: share frame callbacks.Gravatar Jari Vetoniemi2015-03-23
| | | | | | | | Define frame callback logic in wayland_common.c As this should be used by opengl renderer as well. Preferably drawing should be skipped entierly when no frame callbacks are received. However, for now only swap buffers is skipped.
* mp_image: reject 0-sized imagesGravatar wm42015-03-23
| | | | | | Like FFmpeg/Libav do. It seems not all code can actually deal with this situation, so it's better to shift the special-cases to code which needs it (possibly OSD code; screenshots of 0x0 windows would just fail).
* vo_opengl: fix XYZ input gammaGravatar Niklas Haas2015-03-23
| | | | | This seems to have been a mistranslation from the original code, which multiplied the gamma by 2.6 (*not* the color itself).
* vo_vdpau: remove some minor code duplicationGravatar wm42015-03-23
| | | | | The way-too-big API call for clearing the screen can be easily shared between two completely different codepaths.
* vo_vdpau: check vdpau API return valueGravatar wm42015-03-23
|
* vdpau: remove dead assignmentGravatar wm42015-03-23
| | | | | | I guess we don't really care whether this particular function succeeds. If it fails, it must be completely broken anyway and it would not matter much to us.
* vo_opengl: remove dead assignmentGravatar wm42015-03-23
|
* vo_opengl_cb: don't render OSD while VO is not createdGravatar wm42015-03-23
| | | | | | | | | | | Unlike other VOs, this rendered OSD even while no VO was created (because the renderer lives as long as the API user wants). Change this, and refactor the code so that the OSD object is accessible only while the VO is created. (There is a short time where the OSD can still be accessed even after VO destruction - this is not a race condition, though it's inelegant and unfortunately unavoidable.)
* vo_opengl: move OSD rendering to separate functionGravatar wm42015-03-23
| | | | | Also reindent the few lines that call into the actual renderer to remove the "draw_osd" goto.
* vo_opengl: fix video equalizer gamma controlsGravatar wm42015-03-22
| | | | It was ignored.
* vo_opengl: fix background color optionGravatar wm42015-03-21
| | | | | | gl_video_set_options() didn't update it, so the default value set on initialization was used. Fix by always setting the clear color before the clear command; it's slightly easier to follow too.
* vo_opengl: fix bicubic_fast scalerGravatar wm42015-03-21
|
* vd_lavc: less confusing message when hardware decoding won't workGravatar wm42015-03-20
| | | | | | Codecs for hardware acceleration are not blacklisted, but whitelisted. Also, if this emssage is printed, the codec might not have any hardware acceleration support in the first place.
* player: better handling of video with no timestampsGravatar wm42015-03-20
| | | | | | | | | | | Trying to handle such video is almost worthless, but it was requested by at least 2 users. If there are no timestamps, enable byte seeking by setting ts_resets_possible. Use the video FPS (wherever it comes from) and the audio samplerate for timing. The latter was already done by making the first packet emit DTS=0; remove this again and do it "properly" in a higher level.
* vo_xv: remove pointless castGravatar wm42015-03-20
|
* vf_expand: fix memory leak on memory allocation failureGravatar wm42015-03-20
| | | | Isn't it ironic.
* mp_image: do not assume trailing stride padding existsGravatar wm42015-03-20
| | | | | | | | | | | | Normally, the size of an mage plane is assumed to be stride*height. But in theory, if stride is larger than width*bpp, the last line might not be padded, simply because it's not necessary. FFmpeg's or mpv's image allocators always guarantee that this padding exists (it wastes some insignificant memory for avoiding such subtle issues), but some other libraries might not. I suspect one such case might be Xv via vo_xv (see #1698), although my X server appears to provide full padding. In any case, it can't harm.
* video: uninline memcpy_pic functionsGravatar wm42015-03-20
| | | | | | | | | There's literally no reason why these functions have to be inline (they might be performance critical, but then the function call overhead isn't going to matter at all). Uninline them and move them to mp_image.c. Drop the header file and fix all uses of it.
* video: replace pointless macroGravatar wm42015-03-20
| | | | Some old absurdity.
* mp_image: remove unneeded thingsGravatar wm42015-03-20
| | | | (But I'd really prefer removing our own refcounting mechanism fully.)
* player: warn against non-monotonic video PTS only onceGravatar wm42015-03-18
| | | | | | | | For some reason there were two points in the code where it warned against non-monotonic video PTS. The one in video.c triggered on PTS going backwards or making large jumps forwards, while dec_video.c triggered on PTS going backwards or PTS not changing. Merge them into a single check, which warns against all cases.
* osd: simplify an aspect of change detection handlingGravatar wm42015-03-18
| | | | | | | | | | | | | | | | | | There was a somewhat obscure optimization in the OSD and subtitle rendering path: if only the position of the sub-images changed, and not the actual image data, uploading of the image data could be skipped. In theory, this could speed up things like scrolling subtitles. But it turns out that even in the rare cases subtitles have such scrolls or axis-aligned movement, modern libass rarely signals this kind of change. Possibly this is because of sub-pixel handling and such, which break this. As such, it's a worthless optimization and just introduces additional complexity and subtle bugs (especially in cases libass does the opposite: incorrectly signaling a position change only, which happened before). Remove this optimization, and rename bitmap_pos_id to change_id.
* vd_lavc: change message about using hardware decodingGravatar wm42015-03-17
| | | | This was requested. Apparently some find the old mesage confusing.
* video: don't drop anamorphic scaling if it's too minorGravatar wm42015-03-16
| | | | | | | | | This played e.g. a 1264x722 file as 1264x720. There was some code which dropped the aspect ratio if the video (in original resolution) wasn't scaled by more than 4 pixels. Commit 5f3c3f8c introduced this (although I'm not really sure what the code replaced by it did). Just remove this "feature".
* vo_opengl: reduce number of uniforms in dithering passGravatar wm42015-03-16
| | | | | | | We now update uniforms every time, so we should try to reduce the number of uniforms to avoid performance penalties. (Originally, some caching was planned, but it looks like it would be too complicated to implement compared to the expected gains.)
* vo_opengl: move glViewport call closer to draw callGravatar wm42015-03-16
|
* vo_opengl: fix srgb replacement optionsGravatar James Ross-Gowan2015-03-16
| | | | | | OPT_REPLACED can't specify option values or multiple options. Change to OPT_REMOVED. Also, target-prim doesn't have an srgb option. BT.709 uses sRGB primaries, so use it instead.
* vo_opengl: fix incorrectly drawn OSD in idle modeGravatar wm42015-03-16
| | | | | | Trade one bug for another, I don't even care anymore. Fixes #1691.
* vo_opengl: apply OSD color managementGravatar Niklas Haas2015-03-16
|
* vo_opengl: improve queue size heuristicGravatar Niklas Haas2015-03-16
| | | | | | | | The default scaling was a slight bit too low, which could cause buffer underruns in some cases. This should improve the result when using tscale filters other than oversample. The oversample case should be unaffected.
* vo_opengl: improve interpolation diagnosticsGravatar Niklas Haas2015-03-16
| | | | | | This adds extra debugging output for buffer underruns, to help track down possible queueing issues. It also inverts the numberic output for tscale=oversample to make more sense, without changing the logic.