aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
...
* filter_kernels: rename ginseng to ewa_ginsengGravatar Niklas Haas2015-02-23
| | | | | | This is done mainly for consistency, since all of the EWA filters share similar properties and it's important to distinguish them for documentation purposes.
* filter_kernels: add ewa_hanningGravatar Niklas Haas2015-02-23
| | | | | This is suggested in a thesis by Andreas Gustafsson, and seems to produce very a bit less ringing than lanczos at high radius.
* filter_kernels: minor code cleanup of jinc stuffGravatar Niklas Haas2015-02-23
| | | | | | No point in duplicating this check all over the place. No point in really having it in the first place, to be perfectly honest, j1 should not be THAT badly behaved.
* vf: fix indentation level of verbose outputGravatar wm42015-02-23
| | | | | Just so that it has the same indentation as the extremely similar audio filter output.
* vo_opengl: slightly improve ewa_lanczos windowingGravatar Niklas Haas2015-02-23
| | | | | | | | | | | The original filter window was design for a radius based on the true zero, but we always cut it off at our selection of radius either way (by necessity, due to the square matrix we sample from). This window is tweaked from the original (true radius) to our actual cut-off radius, and hence improves the result in a few edge cases. The main win is the reduction of code complexity, since we no longer need to know what the true radius actually is.
* video: un-discourage "vaapi-copy" hwdec modeGravatar wm42015-02-20
| | | | | Maybe I don't know what I'm doing. I'm fairly certain though that Intel does not know what they're doing.
* x11egl: minor cleanupGravatar wm42015-02-20
| | | | Not like it matters, and is probably still not entirely correct.
* vo_opengl: minor robustness improvement in function loaderGravatar wm42015-02-20
| | | | | | Check the scanf() return value, and don't continue if it doesn't find both numbers (can happen with GLES 1.0). Also, some implementations can return NULL from glGetString() if something is "broken".
* vo_opengl: add ginseng upscalerGravatar Niklas Haas2015-02-20
| | | | | | | | | This is a variation of ewa_lanczos that is sinc-windowed instead of jinc-windowed. Results are pretty similar, but the logic is simpler. This could potentially replace the ugly ewa_lanczos code. It's hard to tell, but from comparing stills I think this one has slightly less ringing than regular ewa_lanczos.
* vo_opengl: fix smoothmotion coefficient calculation, for real this timeGravatar Niklas Haas2015-02-20
| | | | | | I've reworked pretty much all the logic to correspond to what the theory actually describes. With this commit, playback is wonderfully smooth on my machine.
* input: add MOUSE_ENTER keybinding.Gravatar torque2015-02-18
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: glsl: remove trailing \Gravatar wm42015-02-16
| | | | | This should be no problem... but it _might_ help with #1536, so it's worth a try.
* vf_vapoursynth: replace a hack with a newer VS API functionGravatar wm42015-02-16
| | | | | The new function does exactly what we need. Replaces the old hack, which created the vscore by running an empty script.
* vd_lavc: uninit the hwdec backend after closing the decoderGravatar wm42015-02-14
| | | | | | | | | | | | | | | | | A recent behavior change in libavcodec's h264 decoder keeps at least 1 surface even after avcodec_flush_buffers() has been called. We used to flush the decoder in order to make sure all surfaces are free'd, so that the hw decoder can be safely uninitialized. This doesn't work anymore. Fix it by closing the AVCodecContext before the hw decoder is uninitialized. This is actually simpler and more robust. It seems to be well-supported too. Fixes invalid read accesses with vaapi-copy and dxva2-copy. These destroyed the hwdec API fully on uninit, and could not deal with surfaces surviving the decoder. Probably fixes #1587.
* x11: fix uninitialized variable readsGravatar wm42015-02-14
| | | | This line of code ended up in the wrong block in commit cd6dfcbe.
* x11: add XK_Cancel to the list of special keysGravatar Martin Herkt2015-02-14
| | | | | Some IR receivers emit this key by default for remote control buttons. Make it mappable.
* vf_vapoursynth: add display refresh rate propertyGravatar Julian2015-02-13
| | | | | This value is not necessarily trustworthy (it might change) and can be 0.
* x11: return a framerate even if no window is mappedGravatar wm42015-02-13
| | | | | Falls back to the first display in the list returned by xrandr. Not entirely correct, but makes some people happy (see #1575).
* x11: make all XF86 special keys mappableGravatar wm42015-02-13
| | | | | | | | Makes all keys documented in XF86keysym.h mappable. This requires the user to deal with numeric keycodes; no names are queried or exported. This is an easy way to avoid adding all the hundreds of XF86 keys to our X11 lookup table and mpv's keycode/name list.
* vo_opengl: fix smoothmotion coefficient calculationGravatar Stefano Pigozzi2015-02-13
| | | | | Using prev_pts as the start of the scale was plain wrong. Change it to prev_vsync.
* vf_lavfi: drop useless option from wrapper filtersGravatar wm42015-02-12
| | | | | | | Filters which merely wrap libavfilter (for user-compatibility) like vf_gradfun had a "lavfi-enable" suboption, which could disable libavfilter usage. Since none of these filters has an internal implementation anymore, this was completely useless.
* video/filters: simplify libavfilter bridgeGravatar wm42015-02-11
| | | | | | | | | | Remove the confusing crap that allowed a filter using the libavfilter bridge to be compiled without libavfilter. Instead, compile the wrappers only if libavfilter is enabled at compile time. The only filter which still requires it is vf_stereo3d (unfortunately). Special-case this one. (The whole filter and how it interacts with lavfi is pure braindeath anyway.)
* vf_noise: remove internal implementationGravatar wm42015-02-11
| | | | | It requires libavfilter now, just like many other filters. Not sure if it even makes sense to keep this wrapper.
* vo: minor simplificationGravatar wm42015-02-07
| | | | Whatever.
* vo_vdpau: minor simplificationGravatar wm42015-02-07
| | | | No change in behavior.
* Revert "vo_opengl: disable alpha by default"Gravatar wm42015-02-06
| | | | | | | | | | This reverts commit a33b46194c3525cb585cc78b449ec275dbfd7f83. It turns out FFmpeg really considers this a bug, and fixed it by making the decoder output the correct pixel format. Fixes #1565. Reverts the fix #1528, though it should work fine with a recent git master FFmpeg.
* video: work around libswscale for PNG pixel formatsGravatar wm42015-02-06
| | | | | | | | The intention is that we can test vo_opengl with high bit depth PNGs better. This throws libswscale completely out of the loop, which before was needed in order to convert from big endian to little endian. Also apply a minimal cleanup to fmt-conversion.c (unrelated).
* vo_opengl: add support for linear scaling without CMSGravatar Niklas Haas2015-02-06
| | | | | | | | | | This introduces a new option linear-scaling, which is now implied by srgb, icc-profile and sigmoid-upscaling. Notably, this means (sigmoidized) linear upscaling is now enabled by default in opengl-hq mode. The impact should be negligible, and there has been no observation of negative side effects of sigmoidized scaling, so it feels safe to do so.
* vo_opengl: get rid of unused field approx_gammaGravatar Niklas Haas2015-02-06
| | | | This was left over from 61f5a80.
* vo_vdpau: remove unneeded codeGravatar wm42015-02-04
| | | | This is already done in the common vo.c code.
* vo_opengl: redraw when pausing while showing an interpolated frameGravatar wm42015-02-04
| | | | | If smoothmotion is enabled, and the screen shows an interpolated frame the moment you pause, redraw a non-interpolated frame.
* cocoa: improve refresh rate fallback codeGravatar Stefano Pigozzi2015-02-03
| | | | | | | | Apparently CoreGraphics reports the actual refresh rate. DisplayLink can also query the nominal refresh rate of the display so we use that as fallback instead of the fugly 60fps hardcode added in aeb1fca0d. Props to people on https://github.com/glfw/glfw/issues/137
* cocoa: automatically fetch display-fps from the monitorGravatar Stefano Pigozzi2015-02-03
| | | | | | | | | | | | Comment explains why I have been so doubtful at adding this. The Apple docs say CGDisplayModeGetRefreshRate is supposed to work only for CRTs, but it doesn't, and actually works for LCD TVs connected over HDMI and external displays (at least that's what I'm told, I don't have the hardware to test). Maybe Apple docs are incorrect. Since AFAIK Apple doesn't want to give us a better API – maybe in the fear we might be able to actually write some useful software instead of "apps" – I decided not to care as well and commit this.
* vo_opengl: disable alpha by defaultGravatar wm42015-02-03
| | | | | | | | | | | | | This reverts the default behavior introduced in commit 93feffad. Way too often libavcodec will return RGB data that has an alpha channel as per pixel format, but actually contains garbage. On the other hand, this will actually render garbage color values in e.g. PNG files (for pixels with alpha==0, the color value should be essentially ignored, which is what the old alpha blend mode did). This "fixes" #1528, which is probably a decoder bug (or far less likely, a broken file).
* vo_opengl: avoid unnecessary shader reinit on fullscreen toggleGravatar wm42015-02-03
| | | | | Makes it unnecessarily slow. It's still needed if the sigmoid crap is actually used.
* vo_opengl: change initialization of gamma optionGravatar wm42015-02-03
| | | | | | | | | | Make the lazy gamma initialization less weird, and make the default value of the "gamma" sub-option 1.0. This means --vo=opengl:help will list the actual default value. Also change the lower bound to 0.1 - avoids a division by zero (I don't know how shaders handle NaN, but it's probably not a good idea to give them this value).
* csputils, vo_opengl: remove per-component gammaGravatar wm42015-02-03
| | | | | | | | | There was some code accounting for different gamma values for R/G/B. It's inherited from an old, undocumented MPlayer feature, which was at some point disabled for convenience by myself (meaning you couldn't actually set separate gamma because it was removed from the property interface - mp_csp_copy_equalizer_values() just set them to the same value). Get rid of these meaningless leftovers.
* csputils: remove some unused functions, make some privateGravatar wm42015-02-03
| | | | | | mp_gen_gamma_map() and mp_gen_yuv2rgb_map() were used by vo_opengl_old only. The other functions removed from csputils.h are used by csputils.c only.
* vo_opengl: change upper bound of :gamma to 2.0Gravatar Niklas Haas2015-02-03
| | | | | This allows a spread of 1.0 in either direction, which is already close to absurd. Anything higher than that is pretty pointless.
* vo_opengl: always clamp the video to range 0-1Gravatar Niklas Haas2015-02-03
| | | | | | Before this, enabling :gamma in combination with :sigmoid and probably a few other things results in ugly artifacts because the video isn't clamped until after the :gamma was applied (or at all, if the cms_matrix is unused).
* win32: don't resize when window is minimizedGravatar wm42015-02-02
| | | | | | | | At least the opengl-hq VO allocates additional resources when downscaling a lot, which is just a waste. Also see #1547 (although I doubt that this is the cause; if it is, a real fix will be required).
* command: add property returning detected hwdec APIGravatar wm42015-02-02
| | | | | | | | | This is somewhat imperfect, because detection of hw decoding APIs is mostly done on demand, and often avoided if not necessary. (For example, we know very well that there are no hw decoders for certain codecs.) This also requires every hwdec backend to identify itself (see hwdec.h changes).
* vo_opengl: fix breakage with rotated video on initial displayGravatar wm42015-02-02
| | | | | | | Resizing was happening before reconfig, so src_rect_rot was outdated and didn't include the rotation. This resulted in corrupted rendering on initial display, which fixed itself after the first time the window was somehow resized.
* vo_opengl: use triangle strip for videoGravatar wm42015-01-30
| | | | | | | | | A small simplification. Couldn't be done before, because it was also used by the OSD code, which required disjoint quads in a single draw call. Also mess with the unrelated code in gl_osd.c to simplify it a little as well.
* vo_opengl: don't unnecessarily call glDebugMessageCallback()Gravatar wm42015-01-30
| | | | | | We still do redundant calls to it, but obviously we can avoid calling it if we don't want to set a callback at all. May or may not help with default.
* vo_opengl: fix a castGravatar wm42015-01-29
| | | | Basically, the OpenGL API is crap (it takes an offset as pointer).
* vf_vapoursynth: load Lua stdlib in Lua modeGravatar wm42015-01-29
| | | | If you can call this a "stdlib".
* vo_opengl: let hwdec driver report the exact image formatGravatar wm42015-01-29
| | | | | | | | | | | | | | | | | | | | Hardware decoding/displaying with vo_opengl is done by replacing the normal video textures with textures provided by the hardware decoding API OpenGL interop code. Often, this changes the format (vaglx and vdpau return RGBA, vda returns packed YUV). If the format is changed, there was a chance (or at least a higher potential for bugs) that the shader generation code could be confused by the mismatch of formats, and would create incorrect conversions. Simplify this by requiring the hwdec interop driver to set the format it will return to us. This affects all fields, not just some (done by replacing the format with the value of the converted_imgfmt field in init_format), in particular fields like colorlevels. Currently, no hwdec interop driver does anything sophisticated, and the win is mostly from the mp_image_params_guess_csp() function, which will reset fields like colorlevels to expected value if RGBA is used.
* vo_opengl: move remaining OSD rendering parts to gl_osd.cGravatar wm42015-01-29
| | | | | | | | | | | | Reduces the size of gl_video.c a bit further. This also uses a separate vertex array object for OSD elements, so the video one can be simplified slightly. OSD shader generation is still in gl_video.c, which leads to the strange additional parameter to mpgl_osd_init(). The issue is that video parameters influence the OSD shader (????), and also OSD needs to go through the screen colormanagement.
* vo_opengl: split out a helper for drawing primitivesGravatar wm42015-01-29
| | | | | | | | Useful if we want to reduce the size of gl_video.c further. To some degree this emulates traditional glDrawArrays() usage. It also leaves a loophole for avoiding a reupload every time by leaving ptr==NULL, although this is unused for now.