| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This adds a couple of missing fields to mp_image_copy_attributes so
things like rotation metadata work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes vo_opengl_cb respond to controls like "gamma" and
"brightness". The commit includes an awkward refactor for vo_opengl to
make it easier for vo_opengl_cb.
One problem is a logical race condition. The set of supported controls
depends on the pixelformat, which in turn is set by reconfig(). But the
actual reconfig() call (on the renderer) happens asynchronously on the
renderer thread. At the time it happens, the player most likely already
tried to set some controls for command line options (see init_vo() in
video.c). So setting this command line options will fail most of the
time, though it could randomly succeed. This can't be fixed directly,
because the player can't wait on the renderer thread, because the
renderer thread might already wait on the player.
|
| |
|
|
|
|
|
| |
Not being able to use the 3x3 part of the matrix was annoying, so split
it into a float[3][3] matrix and a separate float[3] constant vector.
|
|
|
|
|
|
|
|
|
| |
Although the line count increases, this is better for making sure
everything is handled consistently for all users of the mp_csp_params
stuff.
This also makes sure mp_csp_params is always initialized with
MP_CSP_PARAMS_DEFAULTS (for consistency).
|
|
|
|
| |
It used to be central, but now it's just unneeded.
|
|
|
|
| |
Fix some coding style issues, remove doxygen formatting.
|
| |
|
| |
|
|
|
|
|
| |
Like vo_opengl, but way messier, because the already messy config
handling meets threading.
|
|
|
|
|
|
|
|
| |
This adds an "auto" choice to the concurrent-frames suboption, and makes
it the default.
I'm not so sure about making this the default, though. It could lead to
excessive buffering with large CPU counts. But we'll see.
|
|
|
|
| |
Also, don't use av_log() for mpv output.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
There are currently 568 pixel formats (actually fewer, but the namespace
is this big), and for each format elaborate synchronization was done to
call it synchronously on the VO. This is completely unnecessary, and we
can do with just a single call.
|
|
|
|
| |
It couldn't handle the newly added float variable.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Reuse MP_EVENT_WIN_STATE for this.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Use -isInFullScreenMode instead of the property introduced with the 10.10 SDK.
|
|
|
|
| |
regression from 64b6b2ea45
|
|
|
|
|
|
|
|
|
|
| |
While there's no actual need to get rid of these, I want to make sure
nobody actually needs this stuff, and removing it is the best way to
get to know this. We still can revert this commit if it turns out there
is a significant need for this stuff.
The final goal is removing vo_opengl_old entirely. Add a warning, which
basically announces this intention.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, calling mpv_opengl_cb_uninit_gl() at a "bad moment" could
make the whole thing to explode. The API user was asked to avoid such
situations by calling it only in "good moments". But this was probably a
bit too subtle and could easily be overlooked.
Integrate the approach the qml example uses directly into the
implementation. If the OpenGL context is to be unitialized, forcefully
disable video, and block until this is done.
|
|
|
|
|
| |
This is simpler than setting the context after VO creation, which
requires the code to check for the context on every entrypoint.
|
|
|
|
|
| |
Not particularly elegant, but better than adding more and more stuff to
the relevant function signatures.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This input command crashed:
vf add @mf:format=yuv420p ; show_text "${vf-metadata/mf}"
Fixes #1408.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Currently, libavcodec is rather lenient, but it might get stricter in
the future.
Fixes #1398.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Using them reduces state change, since now at least vo_opengl_cb has to
setup/break the vertex array bindings on every frame if no VAOs are
available.
This reverts the VAO related change in commit f64665e7.
|
|
|
|
|
|
|
|
|
|
|
| |
Originally, this code was written to have full control over the OpenGL
state, rather than having to cooperate with unknown components by being
embeded like vo_opengl_cb is meant to be. As a consequence, it was
thought to be ok to setup a global binding (if the context is below
OpenGL 3.0, which guarantees VAOs).
This could break badly. Fix it by setting up and breaking the bindings
on entry/exit.
|
|
|
|
| |
Missing modern OpenGL symbols again.
|
|
|
|
|
| |
The code was always uploading the 3D LUT (even of unused), as long as
vo_opengl was setting a icc-profile. This could crash with GLES 2.
|
|
|
|
|
|
| |
GL_ARB_debug_output provides a logging callback, which can be used to
diagnose problems etc. in case the driver supports it. It's enabled only
if the vo_opengl "debug" suboption is set.
|
|
|
|
|
|
| |
Now it accepts the same renderer arguments as vo_opengl. This also
disables debug checks by default, and reverts the background color
override. Both can now be controlled by the host application.
|
|
|
|
|
|
| |
vo_opengl actually checks this in the context creation code already, but
it still increases robustness in case the requirements are changed
later.
|
|
|
|
|
|
|
| |
Minor memory leak.
Actually, this also exposes some problems in the QtQuick example. This
will have to be fixed in the example.
|
|
|
|
| |
Fixes #1373.
|
|
|
|
|
|
|
|
|
| |
Whether we have texture_rg doesn't matter much anymore; the scaler
should be fine with this. But on ES 2.0, 1st class arrays are missing,
so even if filterable float textures should be available, it won't work.
Dithering (at least the "fruit" variant) will not work either, because
it uses floats.
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently GLES 2 and 3 do not support this. (The implementations I
tested with were derived from desktop OpenGL and were not overly strict
with this.)
This is no problem; just use GL_RGBA and mangle the channels in the
shader.
Also disable direct support for image formats like IMGFMT_RGB555 with
GLES; at least some of them are not supported in this form, and the
formats aren't important anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This used to work correctly without the call to displayIfNeeded. I think this
may only be needed for Yosemite.
Fixes #1330
|
| |
|
|
|
|
|
|
|
|
| |
There are probably bugs with GLES support; also, if you somehow get GLES
instead of desktop GL on a desktop computer, something else is probably
wrong. So I see no point in using this automatically. We first need to
find out whether the GLES support works on real hardware, and whether
it is useful at all.
|
|
|
|
|
|
|
|
| |
Apparently GLX can do this, so using EGL is not strictly required.
This code tries to create an ES context if creating a desktop GL context
fails. Also, a "x11es" backend for forcing ES (instead of desktop GL) is
added, mostly for testing and debugging.
|
|
|
|
|
|
|
| |
Before this, missing additional but required functions were ignored.
("Main" functions still made it error out.) But we pretty much expect
that these are present on a given version level, and only an extremely
buggy OpenGL implementation would not do this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Involve detection of software renderers in the probing properly. Other
VOs could handle probing also more gracefully, and e.g. produce less
noise if an API is unavailable. (Although other than the OpenGL VOs,
only vo_wayland will.)
Now the "sw" suboption for vo_opengl[_old] is strictly speaking not
needed anymore. Doing "--vo=opengl" disables the probing logic, and will
always force it, if possible.
Includes some simplifications as well.
|
|
|
|
| |
The parameter to default_tex_params() is always the same.
|
|
|
|
|
|
|
|
| |
Probably.
The version handling schema is a bit strange (and led to a tricky and
obvious bug), but it's quite similar to what OpenGL does at some places,
so I blame the OpenGL standard.
|
|
|
|
|
|
|
|
| |
Rather basic support. Almost nothing works, and even if it does, it's
bound to be inefficient (due to texture upload). This was tested with
the nVidia desktop binary drivers, which provide GLES 2 support only.
However, nVidia is not known to be very strict about OpenGL, and the
driver is very new too, so the vo_opengl code will have bugs too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed for GLES 2 support. GLES 2 doesn't support
GL_UNPACK_ROW_LENGTH, and we shouldn't even use this constant, since a
GLES implementation could raise an error.
So set it only if neccessary, and leave it in the default state
otherwise. This also smuggles in a ES 2 fallback for glUploadTex(),
and querying an extension relevant for ES 2. For the alignment state
(GL_[UN]PACK_ALIGNMENT) do the same for symmetry. All 4 states
(alignment/rows x pack/unpack) are now assumed to be in their initial
states by default.
Also redo the PixelStorei handling in the function table. I could rebase
this, but look at the commit time.
|
|
|
|
| |
There are probably many more which I overlooked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this was sort of messed together with desktop OpenGL
loading. Add explicit support for ES, and clean up the mess. Also sort
the function arrays alphabetically (at least most of them).
In some cases, add functions to multiple sections. This keeps the number
of sections down.
Don't check for GL_ARB_vertex_array_object. This feature must be used in
OpenGL 3 core, while it may be not available at all in earlier versions,
and not using it if it's available as extension only has no advantages.
This commit also considers GLES 2, because actual support for it will be
added with a later commit.
Also get rid of some MPGL_VER() uses (see some commits ago).
|
|
|
|
|
|
|
|
|
|
|
| |
This was a nice trick to get the mpv colormatrix directly into OpenGL,
because the memory representation happened to match.
Unfortunately, OpenGL ES 2 doesn't have glUniformMatrix4x3fv().
Even more unfortunately, the memory representation is now incompatible.
It would be nice to change it, but that would mean getting into a big
mess.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Always include the window position in winrc, even if the window
embedded. This should give the correct positions for things which still
interact with global coordinates, such as the xrandr code.
|
|
|
|
| |
Don't force every entries without functions to define a dummy array.
|
|
|
|
| |