| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Although C99 supports them, they are optional in C11, and we don't
like/use them anyway.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fix 1 incorrect use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Was missed in the previous changes.
|
| |
|
|
|
|
| |
The struct describing vertex attributes is still public, of course.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
See commit e4bc563fd2dcf for more information.
|
|
|
|
|
| |
Complicated situation due to changes by GPL-only author, but also
unnecessary due to newer mechanisms.
|
|
|
|
| |
GPL-only author, no chance of relicensing.
|
|
|
|
| |
We don't even set it anymore. This really should be up to libavformat.
|
|
|
|
|
|
|
| |
period_size used the wrong unit, and even if the unit had been correct,
was assigned the wrong value.
Probably fixes #4642.
|
|
|
|
| |
Found by https://lintian.debian.org/
|
|
|
|
| |
Needed to update the stable manual if no DOCS were changed.
|
| |
|
| |
|
|
|
|
| |
Forgot to equality test for mp_colorspace.light
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Use uintptr_t instead of size_t. Shouldn't matter, but is cleaner.
|
|
|
|
| |
Consistency/style
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
| |
youtube-dl supports bypassing some geographic restrictions by
setting X-Forwarded-For header when used with geo-bypass and
geo-bypass-country.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This was changed a while ago. Part of it might still apply to the old
D3D hwaccel glue code, though.
|
|
|
|
|
| |
This can help fight ringing without completely killing it, thus
providing a middle-ground between ringing and aliasing.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Also, comma-separated list doesn't actually work, even quote-surrounded.
Switch to using | instead.
|
|
|
|
|
|
|
|
|
| |
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"
|
|
|
|
| |
Not really important, but still interesting to know.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Even if it did return a different result, the bufferFrameCount from the align
hack would be wrong anyway.
|