summaryrefslogtreecommitdiffstats
path: root/video
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* dxva2: fix broken build with gcc 5.1Avi Halachmi (:avih)2015-04-241-0/+5
| | | | | | gpu_mempcy should to be called from code which targets SSE Signed-off-by: wm4 <wm4@nowhere>
* mp_image: remove some unused interlacing flagswm42015-04-233-8/+2
| | | | | | MP_IMGFIELD_TOP/MP_IMGFIELD_BOTTOM were completely unused, and MP_IMGFIELD_ORDERED was always set (even though vf_vdpaupp.c strangely checked for the latter).
* vf_vapoursynth: update _FieldBased semanticswm42015-04-231-4/+4
| | | | These changed in VapourSynth. Also, "_Field" is now unused.
* image_writer: fix writing screenshotswm42015-04-221-1/+1
| | | | | It passed the unconverted image to the writer function. Broken since 2469cb5d.
* 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
|
* video: cleanup some old log messageswm42015-04-201-9/+0
| | | | | These are basically MPlayer leftovers, and barely useful due to being redundant with other messages. The FPS message is used somewhere else.
* image_writer: factor image conversion into a separate functionwm42015-04-202-25/+37
| | | | Needed for a later commit.
* image_writer: minor cleanupwm42015-04-202-11/+11
| | | | Instead of using int like bool, use bool directly.
* vf_vapoursynth: stupid hack to unbreak with recent API changewm42015-04-201-0/+6
| | | | | | | | Vapoursynth made an incompatible API change: clips with unknown length are not supported anymore. In fact, Vapoursynth abort()s the program (which by the way invalidate all of its claims of API/ABI stability). So add some nonsense to make it work again.
* player: change video-bitrate and audio-bitrate propertieswm42015-04-203-8/+1
| | | | | | | | | | | | | | Remove the old implementation for these properties. It was never very good, often returned very innaccurate values or just 0, and was static even if the source was variable bitrate. Replace it with the implementation of "packet-video-bitrate". Mark the "packet-..." properties as deprecated. (The effective difference is different formatting, and returning the raw value in bits instead of kilobits.) Also extend the documentation a little. It appears at least some decoders (sipr?) need the AVCodecContext.bit_rate field set, so this one is still passed through.
* build: fix libavfilter dependency for vf_mirrorxylosper2015-04-201-1/+1
| | | | | | | Since e207c24b32a457859ab6e3a5b1f5f9eaeea36ed1, vf_mirror requires libavfilter. Signed-off-by: wm4 <wm4@nowhere>
* 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
* vf_crop, vf_expand: remove ancient and useless messageswm42015-04-162-19/+1
| | | | These are redundant.
* vf_mirror: replace internal implementation with libavfilterwm42015-04-161-85/+4
| | | | | Currently, libavfilter's equivalent vf_hflip is probably not faster or anything, but there's still no reason to keep the internal code.
* 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.)
* vf_screenshot: remove this filterwm42015-04-163-78/+0
| | | | | | It's entirely useless, especially now that vo.c handles screenshots in a generic way, and requires no special VO support. There are some potential weird use-cases, but actually I've never seen it being used.
* 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-1370-370/+314
| | | | 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 flags fieldwm42015-04-102-6/+4
| | | | | | | Because gcc (and clang) is a goddamn PITA and unnecessarily warns if the universal initializer for structs is used (like mp_image x = {}) and the first member of the struct is also a struct, move the w/h fields to the top.
* mp_image: remove redundant chroma_x/y_shift fieldswm42015-04-104-10/+6
|
* mp_image: remove redundant plane_w/h fieldswm42015-04-104-21/+31
| | | | Seems relatively painful in this case, but they are morally wrong.
* vo_opengl: use correct texture coordinates for nv12wm42015-04-101-1/+1
|
* mp_image: fix buildwm42015-04-091-2/+0
|
* mp_image: get rid of chroma_width/height fieldswm42015-04-091-2/+0
| | | | | | | They are redundant. They were used by draw_bmp.c only, and only in a special code path that 1. used fixed image formats, and 2. had image sized perfectly aligned to chroma boundaries (so computing the chroma width/height is trivial).
* screenshots: drop some useless jpeg writer optionswm42015-04-091-11/+0
|
* screenshots: write jpg files with original subsamplingwm42015-04-091-1/+5
| | | | | A screenshot from a 4:2:0 video will use 4:2:0, RGB will use 4:4:4, and so on. (The image data still goes through RGB conversion always.)
* 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.
* vdpau: don't use a transparent image format for screenshotswm42015-04-071-1/+1
| | | | Fixes #1779.
* screenshots: select best image format the encoder supportswm42015-04-061-24/+34
| | | | | | | | | | | | | | | | | | This matters for png screenshots. We used to hardcode rgb24, but libavformat's png encoder can do much more. Use the image format list provided by the encoder, and select the best format from it (according to the source format). As a consequence, rgb48 (i.e. 16 bit per component) will be selected if the source format is e.g. 10 bit yuv. This happens in accordance to FFmpeg's avcodec_find_best_pix_fmt_of_list() function, which assumes that 16 bit rgb should be preferred for 10 bit yuv. This also causes it to print this message in this case: [ffmpeg] swscaler: full chroma interpolation for destination format 'rgb48be' not yet implemented I'm not 100% sure whether this is a problem.
* 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.
* vf_format: add gamma override optionNiklas Haas2015-04-041-0/+4
|
* vo_opengl: make csp options consistent with vf_formatNiklas Haas2015-04-041-20/+2
|
* csputils: add some missing colorspacesNiklas Haas2015-04-043-12/+92
| | | | | 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
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the core much more elegant, reusable, reconfigurable and also allows us to more easily add aliases for specific configurations. Furthermore, this lets us apply a generic blur factor / window function to arbitrary filters, so we can finally "mix and match" in order to fine-tune windowing functions. A few notes are in order: 1. The current system for configuring scalers is ugly and rapidly getting unwieldy. I modified the man page to make it a bit more bearable, but long-term we have to do something about it; especially since.. 2. There's currently no way to affect the blur factor or parameters of the window functions themselves. For example, I can't actually fine-tune the kaiser window's param1, since there's simply no way to do so in the current API - even though filter_kernels.c supports it just fine! 3. This removes some lesser used filters (especially those which are purely window functions to begin with). If anybody asks, you can get eg. the old behavior of scale=hanning by using scale=box:scale-window=hanning:scale-radius=1 (and yes, the result is just as terrible as that sounds - which is why nobody should have bee