aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* vo_opengl: implement compute shader based EWA kernelGravatar Niklas Haas2017-07-24
| | | | | | | | | | | This performs almost 50% faster on my machine (!!), from 4650μs down to about 3176μs for ewa_lanczossharp. It's possible we could use a similar approach to speed up the separable scalers, although with vastly simpler code. For separable scalers we'd also have the additional huge benefit of only needing padding in one direction, so we could potentially use a big 256x1 kernel or something to essentially compute an entire row at once.
* vo_opengl: support HDR peak detectionGravatar Niklas Haas2017-07-24
| | | | | | | | | | | | | | This is done via compute shaders. As a consequence, the tone mapping algorithms had to be rewritten to compute their known constants in GLSL (ahead of time), instead of doing it once. Didn't affect performance. Using shmem/SSBO atomics in this way is extremely fast on nvidia, but it might be slow on other platforms. Needs testing. Unfortunately, setting up the SSBO still requires OpenGL calls, which means I can't have it in video_shaders.c, where it belongs. But I'll defer worrying about that until the backend refactor, since then I'll be breaking up the video/video_shaders structure anyway.
* vo_opengl: support compute shadersGravatar Niklas Haas2017-07-24
| | | | | | | | These can either be invoked as dispatch_compute to do a single computation, or finish_pass_fbo (after setting compute_size_minimum) to render to a new texture using a compute shader. To make this stuff all work transparently, we try really, really hard to make compute shaders as identical to fragment shaders as possible in their behavior.
* vo_opengl: cut down on FBOTEX_FUZZY abuseGravatar Niklas Haas2017-07-24
| | | | | | | | Don't use FBOTEX_FUZZY where the FBO is sized according to p->texture_w/h, since this changes infrequently (and when it does, we need to reset everything anyway). No real reason to make this change other than that it possibly prevents nasty surprises in the future, so I feel more comfortable about it.
* build: warn against VLAGravatar wm42017-07-24
| | | | | Although C99 supports them, they are optional in C11, and we don't like/use them anyway.
* common, vo_opengl: add/use helper for formatted strings on the stackGravatar wm42017-07-24
| | | | | | | | | | | Seems like I really like this C99 idiom. No reason not to generalize it do snprintf(). Introduce mp_tprintf(), which basically this idiom to snprintf(). This macro looks like it returns a string that was allocated with alloca() on the caller site, except it's portable C99/C11. (And unlike alloca(), the result is valid only within block scope.) Use it in 2 places in the vo_opengl code. But it has the potential to make a whole bunch of weird looking code look slightly nicer.
* vo_opengl: check format on some printf-like callsGravatar wm42017-07-24
| | | | Fix 1 incorrect use.
* vo_opengl: add direct rendering supportGravatar wm42017-07-24
| | | | | | | | | | | | | | | | | | | | Can be enabled via --vd-lavc-dr=yes. See manpage additions for what it does. This reminds of the MPlayer -dr flag, but the implementation is completely different. It's the same basic concept: letting the decoder render into a GPU buffer to avoid a copy. Unlike MPlayer, this doesn't try to go through filters (libavfilter doesn't support this anyway). Unless a filter can work in-place, DR will be silently disabled. MPlayer had very complex semantics about buffer types and management (which apparently nobody ever understood) and weird restrictions that mostly limited it to mpeg2 style codecs. The mpv code does not do any of this, and just lets the decoder allocate an arbitrary number of untyped images. (No MPlayer code was used.) Parts of the code based on work by atomnuker (starting point for the generic code) and haasn (some GL definitions, some basic PBO code, and correct fencing).
* mp_image: expose some image allocation code as helpers, refactorGravatar wm42017-07-23
| | | | | | | Refactor the image allocation code, and expose part of it as helper code. This aims towards allowing callers to easily allocate mp_image references from custom-allocated linear buffers. This is exposing only as much as what should be actually required.
* mp_image_pool: disallow adding read only framesGravatar wm42017-07-23
| | | | | | Remove the feature of adding read-only frames to mp_image_pool_add(). This makes no sense, because an image pool is an allocator, and must always return writable images. Also check these assumptions earlier.
* vo_opengl: osd: remove stale declarationGravatar wm42017-07-23
| | | | Was missed in the previous changes.
* vo_opengl: add printf format checking to pass_describe()Gravatar wm42017-07-22
|
* vo_opengl: make VAO helper private, remove old VAO mechanismGravatar wm42017-07-22
| | | | The struct describing vertex attributes is still public, of course.
* vo_opengl: osd: use new VAO mechanismGravatar wm42017-07-22
| | | | | | | In addition to using the new VAO mechanism introduced in the previous commit, this tries to keep the OSD code self-contained. This doesn't work all too well (because of the pass and CMS stuff), but it's still better than before.
* vo_opengl: add mechanism to create/cache VAO on the flyGravatar wm42017-07-22
| | | | | | This removes VAO handling from video.c. Instead the shader cache will create the VAO as needed. The consequence is that this creates a VAO per shader, which might be a bit wasteful, but doesn't matter anyway.
* vo_opengl: osd: refactor and simplifyGravatar wm42017-07-22
| | | | | | | | Reduce this to 1 draw call per OSD pass. This removes the need for some annoying special handling regarding 3D video support (we supported duplicating the OSD/subtitles for side-by-side 3D output etc.). Remove the unneeded texture sampler uniform thing.
* options: drop --video-aspect-method=hybridGravatar wm42017-07-21
| | | | | | | | | Remove this code because it could be argued that it contains GPL-only code (see commit 642e963c860 for details). The remaining aspect methods appear to work just as well, are potentially more compatible to other players, and the code becomes much simpler.
* client API: drop some compatibility handlingGravatar wm42017-07-21
| | | | See commit e4bc563fd2dcf for more information.
* input: drop deprecated "osd" commandGravatar wm42017-07-21
| | | | | Complicated situation due to changes by GPL-only author, but also unnecessary due to newer mechanisms.
* options: kill --field-dominanceGravatar wm42017-07-21
| | | | GPL-only author, no chance of relicensing.
* demux_lavf: don't free AVFormatContext.key fieldGravatar wm42017-07-21
| | | | We don't even set it anymore. This really should be up to libavformat.
* ao_oss: fix a dumb calculationGravatar wm42017-07-21
| | | | | | | period_size used the wrong unit, and even if the unit had been correct, was assigned the wrong value. Probably fixes #4642.
* manpage: fix minor spelling mistake in mpv.rstGravatar James Cowgill2017-07-19
| | | | Found by https://lintian.debian.org/
* travis: trigger website rebuild on VERSION changes tooGravatar Ricardo Constantino2017-07-19
| | | | Needed to update the stable manual if no DOCS were changed.
* Update VERSIONGravatar Martin Herkt2017-07-18
|
* Release 0.26.0Gravatar Martin Herkt2017-07-18
|
* csputils: fix mp_colorspace_equal missing fieldGravatar Niklas Haas2017-07-18
| | | | Forgot to equality test for mp_colorspace.light
* manpage: upcase JavaScript for section title case consistency.Gravatar torque2017-07-17
|
* vo_opengl: avoid constant divisionsGravatar Niklas Haas2017-07-17
| | | | | | | These are apparently expensive on some drivers which are not smart enough to turn x/42 into x*1.0/42. So, do it for them. My great test framework says it's okay
* demux_disc: fix bluray subtitle language retrievalGravatar wm42017-07-16
| | | | | | | | | It seems like adjusting the raw stream ID should be done only for DVD. Otherwise, getting the subtitle language for Bluray breaks. Untested. Regression since fb9a32977d6. Fixes #4611 (probably).
* vo_opengl: styleGravatar Niklas Haas2017-07-16
| | | | Use uintptr_t instead of size_t. Shouldn't matter, but is cleaner.
* vo_opengl: use MP_ALIGN_UP instead of FFALIGNGravatar Niklas Haas2017-07-16
| | | | Consistency/style
* vo_opengl: use glBufferSubData instead of glMapBufferRangeGravatar Niklas Haas2017-07-16
| | | | | | | | | | | | | | | | | | | | Performance seems pretty much unchanged but I no longer get nasty spikes on NUMA systems, probably because glBufferSubData runs in the driver or something. As a simplification of the code, we also just size the PBO to always have the full size, even for cropped textures. This seems slower but not by relevant amounts, and only affects e.g. --vf=crop. It also slightly increases VRAM usage for textures with big strides. This new code path is especially nice because it no longer depends on GL_ARB_map_buffer_range, and no longer uses any functions that can possibly fail, thus simplifying control flow and seemingly deprecating the manpage's claim about possible image corruption. In theory we could also reduce NUM_PBO_BUFFERS since it doesn't seem like we're streaming uploads anyway, but leave it in there just in case some drivers disagree...
* ytdl_hook: add a header to support geo-bypassGravatar Jagannathan Tiruvallur Eachambadi2017-07-16
| | | | | | youtube-dl supports bypassing some geographic restrictions by setting X-Forwarded-For header when used with geo-bypass and geo-bypass-country.
* osd_libass: avoid libass warnings if scripts set ASS text earlyGravatar wm42017-07-16
| | | | | | | | | | | | | | | | Lua scripts can call osd_set_external() early (before the VO window is created and obj->vo_res is filled), in which case the PlayResX field would be set to nonsense, and libass would print a pointless warning. There's an easy and a hard fix: either just go on and pass dummy values to libass (basically like before, just clamp them to avoid the values which make libass print the warning). Or attempt to update the PlayRes field to correct values on rendering (since at rendering time, you always know the screen size and the correct values). Do the latter. Since various things use PlayRes for scaling things, this might still not be fully ideal. This is a general problem with the async scripting interface.
* Replace remaining avcodec_close() callsGravatar wm42017-07-16
| | | | | | | | This API isn't deprecated (yet?), but it's still inferior and harder to use than avcodec_free_context(). Leave the call only in 1 case in af_lavcac3enc.c, where we apparently seriously close and reopen the encoder for whatever reason.
* vo_opengl: update BufferData usage hintsGravatar Niklas Haas2017-07-15
| | | | | | | | | | | | | | | STREAM is better than DYNAMIC because we're only using it once per frame. As for COPY vs DRAW, that was pretty much incorrect to begin with - but surprisngly, COPY is actually faster (sometimes significantly so, e.g. on my NUMA system). After testing, the best I can gather is that it has to do with the fact that COPY requires fewer redundant memcpy()s, and also 3x reduce RAM bandwidth (in theory). Anyway, that bit shouldn't introduce any regressions, it's just a documentation update. Maybe I'll change my mind about the comment again the future, it's really hard to tell. Vulkan, please save us!
* vo_opengl: coalesce intra-plane PBOsGravatar Niklas Haas2017-07-15
| | | | | | | | | | | | | | Instead of allocating three PBOs and cycling through them, we allocate one PBO that's three times as large, and cycle through the subregion offsets. This results in arguably simpler code and faster initialization performance. Especially for 4K textures, initializing PBOs can take quite some time (e.g. 180ms -> 110ms). For 1080p, it's more like 66ms -> 52ms for me. The alignment to 4096 is completely unnecessary by spec, but we do it anyway just for peace of mind.
* img_format: fix a commentGravatar wm42017-07-15
| | | | | This was changed a while ago. Part of it might still apply to the old D3D hwaccel glue code, though.
* vo_opengl: generalize --scale-clamp etc.Gravatar Niklas Haas2017-07-12
| | | | | This can help fight ringing without completely killing it, thus providing a middle-ground between ringing and aliasing.
* vo_opengl: remove redundant gl_video_setup_hooks callGravatar Niklas Haas2017-07-12
| | | | | | | | This is unnecessary to call from gl_video_resize, because the hooks only (possibly) change when the actual vo_opengl options change. This used to be required back when mpv still had prescaling built in, but since that was all moved to user shaders and the code removed, this is a left-over artifact.
* player: change default section when loading encoding-profiles.confGravatar wm42017-07-12
| | | | | | | It used to use the "encoding" section. Change this to the default section to remove another small special case. encoding-profiles.conf didn't use this by default anyway. The previous revert could mitigate potential impacts of this a little.
* Revert "player: always load encoding-profiles.conf"Gravatar wm42017-07-12
| | | | | | | | | | This reverts commit 0dcb51c7fa2c676ec30f2bac216f904dfc4ffa6f. I randomly decided that this was better. It can be re-applied once it actually becomes necessary in some way. Note that this worked fine. My main gripe with this is that it can spam the log file with encoding stuff even if playback mode is used.
* man/options: fix a few broken options' examplesGravatar Ricardo Constantino2017-07-12
|
* ytdl_hook: actually load the script-optsGravatar Ricardo Constantino2017-07-11
| | | | | Also, comma-separated list doesn't actually work, even quote-surrounded. Switch to using | instead.
* ytdl_hook: add option to exclude URLs from being parsedGravatar Ricardo Constantino2017-07-11
| | | | | | | | | This is more of a niche usecase than --ytdl-format and --ytdl-raw-options, so a simple script option should be enough. Either create lua-settings/ytdl_hook.conf with 'exclude=example.com,sub.example.com' option or "--script-opts=ytdl_hook-exclude=example.com,sub.example.com"
* ytdl_hook: add times for ytdl and hook running on debug-levelGravatar Ricardo Constantino2017-07-11
| | | | Not really important, but still interesting to know.
* ao_wasapi: remove redundant / outdated commentGravatar Kevin Mitchell2017-07-10
| | | | | Where this was moved from, it made slightly more sense. Here what the comment is trying to say is already pretty obvious from the code.
* ao_waspi: use switch for handling fix_format errorsGravatar Kevin Mitchell2017-07-10
|
* ao_wasapi: don't repeat format negotiation on align hackGravatar Kevin Mitchell2017-07-10
| | | | | Even if it did return a different result, the bufferFrameCount from the align hack would be wrong anyway.