aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* client API: more opengl_cb clarificationsGravatar wm42017-08-07
| | | | Also fix a typo in ra_gl.c. Too greedy for a separate commit.
* vo_opengl: add another ra_format field to exclude insane formatsGravatar wm42017-08-07
| | | | | | Generic description of pixel formats is hard. In this case, the Apple special format for packed YUV could have been interpreted as a RGB format with funny packing.
* vo_opengl: further GL API use separationGravatar wm42017-08-07
| | | | | | | | | | | | | | | Move multiple GL-specific things from the renderer to other places like vo_opengl.c, vo_opengl_cb.c, and ra_gl.c. The vp_w/vp_h parameters to gl_video_resize() make no sense anymore, and are implicitly part of struct fbodst. Checking the main framebuffer depth is moved to vo_opengl.c. For vo_opengl_cb.c it always assumes 8. The API user now has to override this manually. The previous heuristic didn't make much sense anyway. The only remaining dependency on GL is the hwdec stuff, which is harder to change.
* vo_opengl: fix minor memory leakGravatar wm42017-08-07
| | | | Don't leak the buffer if glGetProgramBinary() fails.
* vo_opengl: nuke ra_gl->first_runGravatar Niklas Haas2017-08-07
| | | | | | Completely unnecessary, we can just update the uniforms immediately after creating the program. In theory, for GLSL 4.20+, we could even skip this, but oh well.
* vo_opengl: better formatting for enum RA_CAPGravatar Niklas Haas2017-08-07
| | | | | Also fixes an issue where 1 << 5 was used twice, probably because of the terrible formatting obscuring this bug
* vo_opengl: also support RA_VARTYPE_INT vertex attribsGravatar Niklas Haas2017-08-07
| | | | No reason not to.
* vo_opengl: simplify mirroring and fix it if glBlitFramebuffer is usedGravatar wm42017-08-07
| | | | | | | | | | | | | | | | | | The vp_w/vp_h variables and parameters were not really used anymore (they were redundant with ra_tex w/h) - but vp_h was still used to identify whether rendering should be done mirrored. Simplify this by adding a fbodst struct (some bad naming), which contains the render target texture, and some parameters how it should be rendered to (for now only flipping). It would not be appropriate to make this a member of ra_tex, so it's a separate struct. Introduces a weird regression for the first frame rendered after interpolation is toggled at runtime, but seems to work otherwise. This is possibly due to the change that blit() now mirrors, instead of just copying. (This is also why ra_fns.blit is changed.) Fixes #4719.
* travis: install missing x11 depsGravatar Ricardo Constantino2017-08-07
|
* travis: print config.log on failure like appveyorGravatar Ricardo Constantino2017-08-07
|
* vo_opengl: drop pointless fbotex_init() functionGravatar wm42017-08-07
|
* vo_opengl: generalize ra_buf to support other buffer objectsGravatar Niklas Haas2017-08-07
| | | | | This allows us to integrate PBOs and SSBOs into the same abstraction, with the potential to easily add UBOs if the need arises.
* acompressor.lua: Convert to use mp.options and lavfi filter bridgeGravatar Jan Janssen2017-08-07
|
* cocoa: add an option to disable the native macOS fullscreenGravatar Akemi2017-08-06
| | | | Fixes #4014
* ytdl_hook: support fragments with relative pathsGravatar Ricardo Constantino2017-08-06
| | | | | | | Unbreaks segmented DASH with the change in https://github.com/rg3/youtube-dl/commit/1141e9104 which made each segment URL only use relative path from fragment_base_url with a different key.
* vo_opengl: only mark frames as fresh if they contain a new imageGravatar Niklas Haas2017-08-06
| | | | | | | When using dumb mode, we can actually redraw a frame without uploading it. Marking this as fresh as well results in unpredictable pass behavior, which is confusing and makes debugging harder. So mark it as a redraw instead, in that case.
* vo_opengl: drop ra_gl.h from shader_cache.cGravatar Niklas Haas2017-08-06
| | | | | | Since the GL *gl is no longer needed for the timers, we can get rid of the sc->gl dependency. This requires moving a utility function (which is not GL-specific anyway) out of gl_utils.h and into utils.h
* vo_opengl: measure pass_draw_osd as a wholeGravatar Niklas Haas2017-08-06
| | | | | | | | | | | | | | In the past, this always measured the per-shader execution times of the individual OSD parts, which was thrown off because the shader was reused anyway. (And apparently recording the OSD shader execution times was removed completely, probably because of them being so unrealiably anyway) Since ra_timer no longer has the restriction of not allowing timers to run concurrently, we can just wrap the entire OSD block inside a single osd_timer now, and record that. (Technically, this can still be off when using --blend-subtitles=video/yes and showing a full-screen OSD at the same time. Maybe this can be done better?)
* vo_opengl: move timers to struct raGravatar Niklas Haas2017-08-06
| | | | | | | In order to prevent code duplication and keep the ra abstraction as small as possible, `ra` only implements the actual timer queries, it does not do pooling/averaging of the results. This is instead moved to a ra-neutral struct timer_pool in utils.c.
* wscript: fix build of videotoolbox hwaccel for iOSGravatar Aman Gupta2017-08-05
|
* vo_opengl: ra_gl: make getting GL ptr slightly less tediousGravatar wm42017-08-05
|
* vo_opengl: move GL state resetting to vo_opengl_cbGravatar wm42017-08-05
| | | | | | | | | This code is pretty much for the sake of vo_opengl_cb API users. It resets certain state that either the user or our code doesn't reset correctly. This is somewhat outdated. With GL implicit state being so awfully large, it seems more reasonable require that any code restores the default state when returning to the caller. Some exceptions are defined in opengl_cb.h.
* vo_opengl: move shader handling to raGravatar wm42017-08-05
| | | | | | | | | | | | | Now all GL-specifics of shader compilation are abstracted through ra. Of course we still have everything hardcoded to GLSL - that isn't going to change. Some things will probably change later - in particular, the way we pass uniforms and textures to the shader. Currently, there is a confusing mismatch between "primitive" uniforms like floats, and others like textures. Also, SSBOs are not abstracted yet.
* vo_opengl: organize ra PBO flag slightly differentlyGravatar wm42017-08-05
| | | | | | | | Instead of having a mutable ra_tex field (and the only one), move the flag to struct ra, since we have only 2 tex_upload user calls anyway, and both want the same PBO behavior. (At first I considered making it a RA_TEX_UPLOAD_ flag, but why bother. PBOs are a terribly GL-specific thing, so we can't expect a reasonable abstraction of it anyway.)
* vo_opengl: make OSD code use ra for texturesGravatar wm42017-08-05
| | | | | | | | | | | | This requires a silly extension to ra_fns.tex_upload: since the OSD texture can be much larger than the actual OSD image data to upload, a mechanism for uploading only to a small part of the texture is needed. Otherwise, we'd have to realloc/copy the data, just to pad it, and then pay for uploading the padding too. The RA_TEX_UPLOAD_DISCARD flag is not interpreted by GL (not sure how you'd tell GL about this), but it clarifies the API and might be helpful if we support other backend APIs in the future.
* vo_opengl: restore OSX "old" hwdecGravatar wm42017-08-05
| | | | Probably. Untested.
* vo_opengl: split utils.c/hGravatar wm42017-08-05
| | | | | | | | | Actually GL-specific parts go into gl_utils.c/h, the shader cache (gl_sc*) into shader_cache.c/h. No semantic changes of any kind, except that the VAO helper is made public again as part of gl_utils.c (all while the goal for gl_utils.c itself is to be included by GL-specific code).
* vo_opengl: always use GL_TRIANGLES for all primitivesGravatar wm42017-08-05
| | | | Will make the ra layer _slightly_ simpler.
* vo_opengl: pass ra objects during rendering instead of GL objectsGravatar wm42017-08-05
| | | | | | | | | Another "small" step towards removing GL dependencies from the renderer. This commit generally passes ra_tex objects instead of GL FBO integer IDs to various rendering functions. video.c still manually binds the FBOs when calling shaders. This also happens to fix a memory leak with output_fbo.
* vo_opengl: make fbotex helper use raGravatar wm42017-08-05
| | | | | | | | Further work removing GL dependencies from the actual video renderer, and moving them into ra backends. Use of glInvalidateFramebuffer() falls away. I'd like to keep this, but it's better to readd it once shader runs are in ra.
* vo_opengl: drop unused custom texture filter for FBO helperGravatar wm42017-08-05
|
* {demux_mf,osdep/io}: disable glob usage when it is not availableGravatar Jan Ekström2017-08-05
| | | | | | | | This currently is only limited to Android. Its stdlib contains the things that mpv's POSIX check checks for, but unfortunately not glob(). This fixes Android compilation broken in 70a70b9da .
* build: re-add and re-structurize the glob() checksGravatar Jan Ekström2017-08-05
| | | | | | | | * If we have glob() supported, we have `HAVE_GLOB = 1'. * If we have specifically POSIX glob(), we have `HAVE_GLOB_POSIX = 1`. * If we have specifically Win32 glob(), we have `HAVE_GLOB_WIN32 = 1`
* build: move Android environment check to main dependenciesGravatar Jan Ekström2017-08-05
| | | | | | Additionally change the description to better match what Android is, which is an "environment". The original positioning of this check was unfortunate.
* w32_common: handle media keysGravatar James Ross-Gowan2017-08-05
| | | | | | | | | | | | | | | | | This was attempted before in fc9695e63b5b, but it was reverted in 1b7ce759b1f4 because it caused conflicts with other software watching the same keys (See #2041.) It seems like some PCs ship with OEM software that watches the volume keys without consuming key events and this causes them to be handled twice, once by mpv and once by the other software. In order to prevent conflicts like this, use the WM_APPCOMMAND message to handle media keys. Returning TRUE from the WM_APPCOMMAND handler should indicate to the operating system that we consumed the key event and it should not be propogated to the shell. Also, we now only listen for keys that are directly related to multimedia playback (eg. the APPCOMMAND_MEDIA_* keys.) Keys like APPCOMMAND_VOLUME_* are ignored, so they can be handled by the shell, or by other mixer software.
* vo_opengl: always print when getting embedded ICC profile dataGravatar Rostislav Pehlivanov2017-08-04
| | | | | | The printout in get_vid_profile() gets skipped if icc caching has been enabled, so always print if an embedded ICC profile has been provided.
* TOOLS/lua/status-line: improve and updateGravatar Rostislav Pehlivanov2017-08-04
| | | | | | | Updates the line once per second rather than once per frame, saving quite a bit of CPU. Also completely stops the script while paused. That aside, fixes the swapped checks for video and audio-only files and adds bitrate printing.
* bstr: short-circuit bstr_equals on pointer equalityGravatar Niklas Haas2017-08-03
| | | | | More efficient in cases where we're comparing a bstr against itself, which can happen in e.g. the ICC profile code.
* vo_opengl: support embedded ICC profilesGravatar Niklas Haas2017-08-03
| | | | | | | | | | | | | | | | This currently only works when using lcms-based color management (--icc-profile-*). In principle, we could also support using lcms even when the user has not specified an ICC profile, by generating the profile against a fixed reference (--target-prim/--target-trc) instead. I still might do that some day, simply because 3dlut provides a higher quality conversion than our simple gamut mapping does for stuff like BT.2020, and also because it's now needed to enable embedded ICC profiles. But that would be a separate change, so preserve the status quo for now. (Besides, my opinion is still that you should be using an ICC profile if you care about colors being accurate _at all_)
* vd_lavc: decode embedded ICC profilesGravatar Niklas Haas2017-08-03
| | | | | | | | | Since these need to be refcounted, we throw them directly into struct mp_image instead of being part of mp_colorspace. Even though they would semantically make more sense in mp_colorspace, having them there is really awkward because mp_colorspace is passed around and stored a lot, and this way their lifetime is exactly tied to the lifetime of the mp_image associated with it.
* vo_opengl: use GL_CLIENT_STORAGE_BIT for DRGravatar Niklas Haas2017-08-03
| | | | | | | | | mesa won't pick client storage unless this bit is set, and we *absolutely* want to be using client storage for our DR PBOs. Performance is shit on AMD otherwise. (Nvidia always uses client storage for persistent coherent buffers whether you tell it it or not, probably because it's way faster and nvidia doesn't trust users to figure that out on their own)
* vo_opengl: remove unused ra_mapped_buffer.preferred_align fieldGravatar wm42017-08-03
| | | | | | | | | | | It makes no sense to have this on an already created buffer. If anything, the ra backend would have to export this as a global value (e.g. struct ra field), so that whatever allocates the buffer can account for the required alignment. Since this code is in vo_opengl.c in the first place, and since GL doesn't dictate any special alignment here, it doesn't make sense in the first place to export this. (Maybe something like this will be required later.)
* vo_opengl: don't hardcode texmap0 for polar computeGravatar Niklas Haas2017-08-03
| | | | | This was an oversight. The ID shouldn't be hard-coded here, so add it to sampler_prelude instead.
* vo_opengl: don't precompute texcoord in global scopeGravatar Niklas Haas2017-08-03
| | | | | | | | | | | Breaks on mesa for whatever reason... even though it doesn't generate a GLSL shader compiler error Shouldn't make a performance difference for us because we cache `pos` anyway, and most compute shaders will probably cache all of their samples to shmem. Might have to re-visit this when we have an actual use case for repeated sampling inside CS though. (RAVU + anti-ringing is a possible candidate for that)
* vo_opengl: make compute shaders more flexibleGravatar Niklas Haas2017-08-03
| | | | | | This allows users to do their own custom sample writing, mainly meant to address use cases such as RAVU. Also clean up the compute shader code a bit.
* vo_opengl: add legend for texture format debug dumpGravatar wm42017-08-03
|
* vo_opengl: give special Apple name a more appropriate nameGravatar wm42017-08-03
| | | | | | | | Or less appropriate, as some would argue. The new name is short for "Apple YUV packed". (This format is needed only for hardware decoding on rather old Apple hardware, and a very annoying special case.)
* vo_opengl: simplify/fix user shader texturesGravatar wm42017-08-03
| | | | | | | | | | | | | | | | | | | | This broke float textures, which were actually used by some shaders. There were probably some other bugs as well. Lots of code can be avoided by using ra_tex_params directly, so do that. The main change is that COMPONENT/FORMAT are replaced by a single FORMAT directive, which takes different parameters now. Due to the mess with 16/32 bit float textures, and because we want to support other APIs than just GL in the future, it's not really clear how this should be handled, and the nice component/type separation makes things actually harder. So just jump the gun and use the ra_format.name names, which were originally meant mostly for debugging. (This is probably something that will be regretted later.) Still only superficially tested, but seems to work. Fixes #4708.
* travis: drop libav-stable supportGravatar wm42017-08-03
| | | | | | | | | | | For libav-stable, we download the Libav tarball, which is failing, because their certificate is broken: ERROR: cannot verify libav.org's certificate, issued by `/C=US/O=Let\'s Encrypt/CN=Let\'s Encrypt Authority X3': Issued certificate has expired. I don't intend to support Libav's overly old releases anymore anyway, so if you want to use Libav, use its git master.
* vo_opengl: fix constexprs on ANGLEGravatar Niklas Haas2017-08-03
| | | | I hate GLES