summaryrefslogtreecommitdiffstats
path: root/video/out
Commit message (Collapse)AuthorAgeFilesLines
* vo_opengl: change default FBO formatwm42015-05-051-1/+1
| | | | | | | | Reduces (but likely does not remove) the danger of rounding intermediate values down to 8 bit. This is important for cscale, or any other processing that might store raw YUV values in framebuffers. Fixes #1918.
* vo_opengl: gl_lcms: fix cache dir creation with path expansionwm42015-05-031-9/+9
| | | | | | Path expansion (like "~/dir/" in config file) was used inconsistently, so the cache directory wasn't always created correctly. Fix this by moving the path expansion from load_file() to its callers.
* cocoa: always compile OSX application code with cocoawm42015-05-021-6/+2
| | | | | | | | | | | | | | This unbreaks compiling command line player and libmpv at the same time. The problem was that doing so silently disabled the OSX application thing - but the command line player can not use the vo_opengl Cocoa backend without it. The OSX application code is basically dead in libmpv, but it's not that much code anyway. If you want a mpv binary that does not create an OSX application singleton (and creates a menu etc.), you must disable cocoa completely, as cocoa can't be used anyway in this case.
* vo_opengl: gl_lcms: create cache dirwm42015-05-021-0/+2
| | | | Minor user convenience.
* vo_opengl: gl_lcms: make sure win32 unicode fopen() wrapper is enabledwm42015-05-021-0/+2
|
* vo_opengl: gl_lcms: minor simplificationwm42015-05-021-2/+1
|
* vo_opengl: gl_lcms: use mp_path_join()wm42015-05-021-3/+3
| | | | | | | Maybe this fixes the win32 problems a user had, or maybe not. Also, check if cache_dir is set at all. An empty string should be equivalent to "unset".
* vo_opengl: gl_lcms: make ICC loading less verboseNiklas Haas2015-05-011-2/+2
| | | | | Especially with the new ICC cache rework, you get a lot of ugly output messages that don't really contain any meaningful content.
* vo_opengl: gl_lcms: replace icc-cache by icc-cache-dirNiklas Haas2015-05-012-24/+33
| | | | | | | | | | This now stores caches for multiple ICC profiles, potentially all the user has ever used. The big use case for this is for users with multiple monitors. The old logic would mandate recomputing the LUT and discarding the cache whenever dragging mpv from one screen to another. This also avoids having to save and check the ICC profile itself, since the file name already uniquely determines it.
* vo_opengl: attach target-prim/target-csp to window screenshotsNiklas Haas2015-05-011-2/+9
| | | | | | | | | This will essentially make screenshot-tag-colorspace also affect the "screenshot window" command, where possible. Unfortunately, it's completely incompatible with icc-profile, due to API limitations of ffmpeg (we can only give it an enum of well-known primaries, rather than an actual ICC profile or primaries).
* vo_rpi: update renderer size on display size changes toowm42015-05-011-0/+2
| | | | | | | | (Not sure why it worked without this when I tested the previous changes.) Untested, but should be fine. This is equivalent what is done on e.g. panscan changes.
* video/out: remove VOFLAG_FLIPPINGwm42015-05-013-12/+2
| | | | | | | I think this used to be quite important, because the ancient VfW support in MPlayer used to output flipped frames. This code has been dead in mpv for quite some time (because VfW decoders were removed, and the --flip option was dropped too), so get rid of it.
* vo_opengl: refactor wayland frame skippingwm42015-05-016-31/+33
| | | | | | | | | | | Currently, the wayland backend needs extra work to avoid drawing more often than the wayland frame callback allows. (This is not ideal, but will be fixed at a later time.) Unify this with the start_frame callback added for cocoa. Some details change for the better. For example, if a frame is dropped, and a redraw is done afterwards, the actually correct frame is redrawn, instead whatever was in the textures from before the dropped frame.
* cocoa: don't accidentally drop initial screen drawingwm42015-05-015-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | With --idle --force-window, or when started from the bundle, the cocoa code dropped the first frame. This resulted in a black frame on start sometimes. The reason was that the live resizing/redrawing code was invoked, which simply set skip_swap_buffer to false, blocking redrawing whatever was going to be rendered next. Normally this is done so that the following works: 1. vo_opengl draw a frame, releases GL lock 2. live resizing kicks in, redraw the frame 3. vo_opengl wants to call SwapBuffers, drawing a stale buffer overwritten by the live resizing code This is solved by setting skip_swap_buffer in 2., and querying it in 3. Fix this by resetting the skip_swap_buffer at a known good point: when vo_opengl starts drawing a new frame. The start_frame function returns bool, so that it can be merged with is_active in a following commit.
* vo: improve frame drop logic on high playback rateAvi Halachmi (:avih)2015-05-011-3/+11
| | | | | | | | | | | | | | | Commit f1746741dee6000b7fd139e7a10f72aba0674b3b changed the drop logic to have more slack (drop more frames but less frequent) to prevent drops due to timing jitter when the clip and screen have similar rates. However, if the clip has higher rate than the screen (or just higher playback rate), then that policy hurts smoothness since these "chunked drops" look worse than one frame drop at a time. This patch restores the old drop logic when the playback frame rate is higher than ~5% above the screen refresh rate, and solves this issue. Fixes #1897
* vo_rpi: update display size on display mode switcheswm42015-04-301-0/+23
|
* vo_rpi: actually draw a black backgroundwm42015-04-301-23/+65
| | | | | | | | Also factor the display size initialization into a separate function. For some reason this seems to work, although setting the background color using this 1x1 pixel bitmap does not work. I blame the RPI beign a terrible piece of hardware with even worse drivers.
* x11: query ICC profile based on center of windowNiklas Haas2015-04-291-1/+3
| | | | | | | | | | Right now, the default behavior is to pick the numerically lowest screen ID that overlaps the window in any way - but this means that mpv will decide to pick an ICC profile in a pretty arbitrary way even if the window only overlaps another screen by a single pixel. The new behavior is to query it based on the center of the window instead.
* vo_drm: zero screen buffers in reconfig function.akemi-san2015-04-271-0/+4
|
* vo_drm: add window screenshots supportMarcin Kurczewski2015-04-261-0/+3
|
* player: add --window-scale optionwm42015-04-241-0/+2
| | | | Requested. Works similar to the property with the same name.
* w32_common: add more rounded-down frame ratesJames Ross-Gowan2015-04-251-0/+4
| | | | | Suggested by avih. This handles x/1.001 frame rates for all multiples of 24 and 30 under 144.
* w32_common: use the current monitor's refresh rateJames Ross-Gowan2015-04-251-9/+10
|
* vo_drm: fix return value for void functionMarcin Kurczewski2015-04-211-1/+1
|
* vo_drm: fix coding style to adhere to guidelinesMarcin Kurczewski2015-04-212-8/+8
|
* vo_drm: fix releasing VT if received signal twiceMarcin Kurczewski2015-04-211-0/+3
| | | | | | If user switched terminals frantically, mpv could get SIGUSR1 twice in a row, which, up until now, resulted in destroying CRTC twice. This caused it to segfault. After this fix, double SIGUSR1 should be ignored.
* vo_drm: add vertical syncMarcin Kurczewski2015-04-211-5/+45
|
* w32_common: prevent system sleepJames Ross-Gowan2015-04-201-1/+2
| | | | | | This prevents the machine from going to sleep while a video-only stream is playing. When audio is playing, the audio stack should make this request for us.
* vo_drm: extract vt_switcher to drm_commonMarcin Kurczewski2015-04-193-132/+225
|
* vo_drm: disable VT switcher for non-Linux systemsMarcin Kurczewski2015-04-191-2/+3
|
* vo_drm: fix logging problems with connectorsMarcin Kurczewski2015-04-181-1/+1
| | | | | | | Logging was meant to be silenced only when user uses connector auto-detection feature. If user supplies connector ID manually, he should see exact reason why connecting to this specific connector failed.
* vo_drm: fix VT behavior with auxiliary screensMarcin Kurczewski2015-04-181-2/+4
| | | | Fixes #1828
* vo_drm: fix VT switchingMarcin Kurczewski2015-04-181-55/+229
| | | | Fixes #1827
* vo: fix non-sense in init codewm42015-04-161-1/+1
| | | | | I assume this was intended to generate an initial change event in order to make the user read the initial values.
* vo: cosmetics: reindent VO listwm42015-04-161-23/+23
| | | | | And also undoxygenify a comment. (There used to be some inconsistent doxygen comments in MPlayer time; they are being removed on sight.)
* vo_drm: add KMS/DRM renderer supportMarcin Kurczewski2015-04-162-0/+517
| | | | Signed-off-by: wm4 <wm4@nowhere>
* x11: actually disable screensaverwm42015-04-152-12/+61
| | | | | | | | | | | | | | | | | | | We already use 2 screensaver APIs when attempting to disable the screensaver: XResetScreenSaver() (from xlib) and XScreenSaverSuspend (from the X11 Screen Saver extension). None of these actually work. On modern desktop Linux, we are expected to make dbus calls using some freedesktop-defined protocol (and possibly we'd have to fallback to a Gnome specific one). At least xscreensaver doesn't respect the "old" APIs either. Solve this by running the xdg-screensaver script. It's a terrible, ugly piece of shit (just read the script if you disagree), but at least it appears to work everywhere. It's also simpler than involving various dbus client libraries. I hope this can replace the --heartbeat-cmd option, and maybe we could remove our own DPMS/XSS code too.
* vo_opengl: change dwmflush option valueswm42015-04-141-1/+2
| | | | | Use a choice instead of an integer. This is incompatible, but I'm not adding any compatibility since this option was added recently.
* vo_rpi: explicitly reference MMAL VC driverwm42015-04-131-0/+8
| | | | | | | This is optional, but ensures that linking with -Wl,--as-needed does not drop the MMAL VC driver. The driver normally "registers" itself in the library constructor, but since no symbols are explicitly referenced, the linker could remove it with as-needed enabled.
* Update license headersMarcin Kurczewski2015-04-1331-181/+161
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: slightly simplify check_gl_features()wm42015-04-111-25/+12
| | | | | | | | | | Not sure why this was so roundabout; probably to keep spam down if the user's OpenGL drivers are crap (but then just don't enable extended features), or because the "Disabling..." text was so repetitious. But there doesn't seem to be a good reason after all. Also, this could already overflow the fixed size disabled[] array. Just print the messages directly.
* vo_opengl: unify blend-subtitles-res and blend-subtitleswm42015-04-112-8/+7
|
* vo_opengl: fix blend-subtitles-res=video & anamorphic videowm42015-04-111-1/+6
| | | | | Since scaling the video changes the aspect ratio, we have to compensate for this when rendering subtitles.
* vo_opengl: add blend-subtitles-resNiklas Haas2015-04-102-4/+19
| | | | | This can be used to draw the subtitles at the video's native res, which can make them look more natural and increases performance.
* mp_image: remove redundant plane_w/h fieldswm42015-04-101-4/+5
| | | | Seems relatively painful in this case, but they are morally wrong.
* vo_opengl: use correct texture coordinates for nv12wm42015-04-101-1/+1
|
* opengl: win32 - add option 'dwmflush' to sync in DWMAvi Halachmi (:avih)2015-04-093-0/+59
| | | | | | | This could help in cases where the DWM (Windows desktop compositor) adds another layer of bufferring and therefore the SwapBuffers timing could get messed up. Signed-off-by: wm4 <wm4@nowhere>
* opengl: smoothmotion: wake up for next vsync a bit earlierAvi Halachmi (:avih)2015-04-091-1/+1
| | | | | | | | on my windows system this allows smoothmotion to work perfectly also in windowed mode. There's no real right or wrong here, with the the only goal being to always hit the next vsync. however, on cases where vsync timing is jittery (as could happen with DWM), this patch tries to aim to the middle of the vsync cycle to get as least affected as possible by such jitter.
* opengl: drop less frames when clip and display have similar fpsAvi Halachmi (:avih)2015-04-091-1/+9
| | | | | | | | adds 1 vsync interval "slack" before deciding to drop the first frame. it should help on cases of timing jitter (sleep duration, container timestamps, compositor vsync timing, etc). once the drop threshold has been crossed, it will keep dropping until perfect timing alignment. this prevents crossing the drop threshold back and forth repeatedly and therefore more resilient to frame drops
* vo_opengl_cb: deprecate mpv_opengl_cb_render()wm42015-04-091-2/+1
| | | | Its vp parameter made no sense anymore. Introduce a new one.
* vo_opengl_cb: add a function to report vsync timewm42015-04-091-0/+21
| | | | | | | And also let vo.c know of it. Currently, this does not help much, but will facilitate future improvements.
* vo_opengl_cb: fix video timing somewhatwm42015-04-091-2/+2
| | | | | | | | | | | | | | | | | | Increase the default queue size. This helps with "missed" frames due to the asynchronous nature of the API. All the other VOs are synchronous, so if rendering and displaying takes a while, the common code in vo.c will be blocked until it can continue. But with opengl-cb, vo.c might immediately push the next ready frame, which causes the current frame to be dropped _if_ it wasn't rendered yet. One could fix this by making vo.c wait a while (until the API user calls the render function, which pulls the frame). But setting the default queue size to 2 seems much simpler: instead of dropping the frame, it will be pushed to the API user once the next renderer call finishes. (This is still a bit strange, and will hopefully be cleaned up when video scheduling is redone, but for now this appears to deliver relatively good results.)
* vo_opengl: log used GLXFBConfigwm42015-04-091-0/+1
| | | | | Now don't ask me why the GLXFBConfig type is a pointer, but stores an integer ID.
* vo_opengl: remove unused functionwm42015-04-092-6/+0
|
* video/out: fix screenshot image formatswm42015-04-073-3/+3
| | | | | | | Use variants without alpha. I skipped vo_sdl, because format selection seems a bit more complicated here, and nobody cares about vo_sdl anymore.
* vaapi: fight with Intel's broken video decoding GL interopwm42015-04-051-24/+81
| | | | | | | | | | | | | | | | | | | | | | | | Use texture-from-pixmap instead of vaapi's "native" GLX support. Apparently the latter is unused by other projects. Possibly it's broken due that, and Intel's inability to provide anything non-broken in relation to video. The new code basically uses the X11 output method on a in-memory pixmap, and maps this pixmap as texture using standard GLX mechanisms. This requires a lot of X11 and GLX boilerplate, so the code grows. (I don't know why libva's GLX interop doesn't just do the same under the hood, instead of bothering the world with their broken/unmaintained "old" method, whatever it did. I suspect that Intel programmers are just genuine sadists.) This change was suggested in issue #1765. The old GLX support is removed, as it's redundant and broken anyway. One remaining issue is that the first vaPutSurface() call fails with an unknown error. It returns -1, which is pretty strange, because vaapi error codes are normally positive. It happened with the old GLX code too, but does not happen with vo_vaapi. I couldn't find out why.
* vo_opengl: make csp options consistent with vf_formatNiklas Haas2015-04-041-20/+2
|
* csputils: add some missing colorspacesNiklas Haas2015-04-041-2/+31
| | | | | With target-prim and target-trc it makes sense to include some common colorspaces that aren't strictly speaking used for video.
* vo_opengl: minor cleanup of gamma-related functionsNiklas Haas2015-04-041-5/+4
|
* vo_opengl: blend-subtitles in non-linear lightNiklas Haas2015-04-041-35/+42
|
* vo_opengl: make jinc presets resizableNiklas Haas2015-04-041-6/+6
| | | | No real reason this is disabled with the new configuration API.
* vo_opengl: add scale-wparam optionNiklas Haas2015-04-041-8/+12
| | | | This lets us tune the window parameter
* filter_kernels: add haasnsoftNiklas Haas2015-04-041-0/+4
| | | | | | | This is a peculiar filter I stumbled upon while playing around with windows, it removes aliasing almost completely while not ringing at all. The downside is that it's quite blurry, but at high resolutions it's not so noticeable.
* filter_kernels: remove hermite windowNiklas Haas2015-04-041-1/+0
| | | | Will have to find a source before re-adding.
* filter_kernels: add bartlett, blackman and welch windowsNiklas Haas2015-04-041-1/+17
|
* vo_opengl: refactor scaler configurationNiklas Haas2015-04-044-129/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merges all of the scaler-related options into a single configuration struct, and also cleans up the way they're passed through the code. (For example, the scaler index is no longer threaded through pass_sample, just the scaler configuration itself, and there's no longer duplication of the params etc.) In addition, this commit makes scale-down more principled, and turns it into a scaler in its own right - so there's no longer an ugly separation between scale and scale-down in the code. Finally, the radius stuff has been made more proper - filters always have a radius now (there's no more radius -1), and get a new .resizable attribute instead for when it's tunable. User-visible changes: 1. scale-down has been renamed dscale and now has its own set of config options (dscale-param1, dscale-radius) etc., instead of reusing scale-param1 (which was arguably a bug). 2. The default radius is no longer fixed at 3, but instead uses that filter's preferred radius by default. (Scalers with a default radius other than 3 include sinc, gaussian, box and triangle) 3. scale-radius etc. now goes down to 0.5, rather than 1.0. 0.5 is the smallest radius that theoretically makes sense, and indeed it's used by at least one filter (nearest). Apart from that, it should just be internal changes only. Note that this sets up for the refactor discussed in #1720, which would be to merge scaler and window configurations (include parameters etc.) into a single, simplified string. In the code, this would now basically just mean getting rid of all the OPT_FLOATRANGE etc. lines related to scalers and replacing them by a single function that parses a string and updates the struct scaler_config as appropriate.
* vo_opengl: separate kernel and windowNiklas Haas2015-04-044-130/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | |