aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* Merge branch 'master' into remove_old_demuxersGravatar wm42013-07-08
|\ | | | | | | | | | | Conflicts: DOCS/man/en/changes.rst DOCS/man/en/options.rst
| * Merge remote-tracking branch 'origin/low_quality_intel_crap'Gravatar Martin Herkt2013-07-08
| |\ | | | | | | | | | | | | Conflicts: video/out/gl_video_shaders.glsl
* | | Remove old demuxersGravatar wm42013-07-07
|/ / | | | | | | | | | | | | | | | | | | Delete demux_avi, demux_asf, demux_mpg, demux_ts. libavformat does better than them (except in rare corner cases), and the demuxers have a bad influence on the rest of the code. Often they don't output proper packets, and require additional audio and video parsing. Most work only in --no-correct-pts mode. Remove them to facilitate further cleanups.
* | dither: don't use long doubleGravatar wm42013-07-05
| | | | | | | | | | | | | | | | | | | | This fixes compilation with broken libcs, like on Cygwin. C99 absolutely requires long double and associated functions like expl, even if long double is double. But newlib (used by cygwin) omits declaration for these if long double is equivalent to double. The extra precision is not needed here, so remove it to make life easier for the single person using mpv with cygwin.
* | core: remove mp_fifo leftoversGravatar wm42013-07-04
| |
* | wayland: remove mp_fifo headerGravatar Alexander Preisinger2013-07-03
| |
* | wayland: fix typoGravatar Alexander Preisinger2013-07-03
| |
* | wayland: remove unused membersGravatar Alexander Preisinger2013-07-03
| |
* | wayland: remove mp_fifoGravatar Alexander Preisinger2013-07-02
| |
* | wayland: implement MOUSE_LEAVEGravatar Alexander Preisinger2013-07-02
| |
* | core: cleanup more mp_fifo leftoversGravatar wm42013-07-02
| | | | | | | | Now only the OSX and Wayland parts are using this.
* | core: remove mp_fifo indirectionGravatar wm42013-07-02
| | | | | | | | | | | | | | | | | | | | For some reason mp_fifo specifically handled double clicks, and other than that was a pointless wrapper around input.c functionality. Move the double click handling into input.c, and get rid of mp_fifo. Add some compatibility wrappers, because so much VO code uses these functions. Where struct mp_fifo is still used it's just a casted struct input_ctx.
* | input: require VOs to send key up events, redo input key lookupGravatar wm42013-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Making key up events implicit was sort-of a nice idea, but it's too tricky and unreliable and makes the key lookup code (interpret_keys()) hard to reason about. See e.g. previous commit for subtle bugs and issues this caused. Make key-up events explicit instead. Add key up events to all VOs. Any time MP_KEY_STATE_DOWN is used, the matching key up event must use MP_KEY_STATE_UP. Rewrite the key lookup code. It should be simpler and more robust now. (Even though the LOC increases, because the new code is less "compact".)
* | w32_common: prevent display power managementGravatar James Ross-Gowan2013-06-30
| | | | | | | | | | | | | | | | Handling SC_MONITORPOWER doesn't seem to prevent the screen from dimming. The recommended way to do this in Windows XP and Vista is to call SetThreadExecutionState with ES_DISPLAY_REQUIRED. Windows 7 also has the PowerCreateRequest/PowerSetRequest/PowerClearRequest APIs but they're probably too complicated for this task.
* | w32_common: prevent that window dragging and mouse input interfereGravatar wm42013-06-29
| |
* | w32_common: refactor mouse button code, handle mouse up eventsGravatar wm42013-06-29
| | | | | | | | | | Instead of sending a single event on click, send both down and up events.
* | input: trigger mouse_leave key bindings if mouse leaves mouse areaGravatar wm42013-06-29
| | | | | | | | | | | | Also, implement mouse leave events for X11. But evne on other platforms, these events will be generated if mouse crosses a section's mouse area boundaries within the mpv window.
* | input: handle mouse movement differentlyGravatar wm42013-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, mouse movement events emitted a special command ("set_mouse_pos"), which was specially handled in command.c. This was once special-cased to the dvdnav and menu code, and did nothing after libmenu and dvdnav were removed. Change it so that mouse movement triggers a pseudo-key ("MOUSE_MOVE"), which then can be bound to an arbitrary command. The mouse position is now managed in input.c. A command which actually needs the mouse position can use either mp_input_get_mouse_pos() or mp_get_osd_mouse_pos() to query it. The former returns raw window-space coordinates, while the latter returns coordinates transformed to OSD- space. (Both are the same for most VOs, except vo_xv and vo_x11, which can't render OSD in window-space. These require extra code for mapping mouse position.) As of this commit, there is still nothing that uses mouse movement, so MOUSE_MOVE is mapped to "ignore" to silence warnings when moving the mouse (much like MOUSE_BTN0). Extend the concept of input sections. Allow multiple sections to be active at once, and organize them as stack. Bindings from the top of the stack are preferred to lower ones. Each section has a mouse input section associated, inside which mouse events are associated with the bindings. If the mouse pointer is outside of a section's mouse area, mouse events will be dispatched to an input section lower on the stack of active sections. This is intended for scripting, which is to be added later. Two scripts could occupy different areas of the screen without conflicting with each other. (If it turns out that this mechanism is useless, we'll just remove it again.)
* | cocoa_common: uninit fs window properlyGravatar Stefano Pigozzi2013-06-29
| | | | | | | | | | | | | | | | In fullscreen `s->window` is the windowed window. So freeing that didn't get rid of the FS window and OpenGL view. Fixes #122 [ci skip]
* | csputils.h: don't recursively include libavcodec headerGravatar wm42013-06-28
| | | | | | | | | | | | | | | | Some functions (avcol_spc_to_mp_csp() etc.) used libavcodec enum types as parameters. Remove these in order to get rid of the avcodec.h include statement. This prevents that avcodec.h is recursively included by dozens of files. Fix mp_image.c, which used the header without explicitly including avcodec.h.
* | vo_opengl: handle chroma locationGravatar wm42013-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the video decoder chroma location flags and render chroma locations other than centered. Until now, we've always used the intuitive and obvious centered chroma location, but H.264 uses something else. FFmpeg provides a small overview in libavcodec/avcodec.h: ----------- /** * X X 3 4 X X are luma samples, * 1 2 1-6 are possible chroma positions * X X 5 6 X 0 is undefined/unknown position */ enum AVChromaLocation{ AVCHROMA_LOC_UNSPECIFIED = 0, AVCHROMA_LOC_LEFT = 1, ///< mpeg2/4, h264 default AVCHROMA_LOC_CENTER = 2, ///< mpeg1, jpeg, h263 AVCHROMA_LOC_TOPLEFT = 3, ///< DV AVCHROMA_LOC_TOP = 4, AVCHROMA_LOC_BOTTOMLEFT = 5, AVCHROMA_LOC_BOTTOM = 6, AVCHROMA_LOC_NB , ///< Not part of ABI }; ----------- The visual difference is literally minimal, but since videophiles apparently consider this detail as quality mark of a video renderer, support it anyway. We don't bother with chroma locations other than centered and left, though. Not sure about correctness, but it's probably ok.
* | video: add a new method to configure filters and VOsGravatar wm42013-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The filter chain and the video ouputs have config() functions. They are strictly limited to transfering the video size and format. Other parameters (like color levels) have to be transferred separately. Improve upon this by introducing a separate set of reconfig() functions, which use mp_image_params to carry format parameters. This struct contains all image format related parameters from config(), plus additional parameters such as colorspace. Change vf_rotate to use it, as well as vo_opengl. vf_rotate is just an example/test case, but vo_opengl will need it later. The intention is also to get rid of VOCTRL_SET_YUV_COLORSPACE. This information is now handed to the VOs via reconfig(). The getter, VOCTRL_GET_YUV_COLORSPACE, will still be needed though.
* | mp_image: copy palette only if allocatedGravatar wm42013-06-28
| | | | | | | | | | | | Normally, we assume that IMGFMT_PAL8 always has a palette allocated in plane 1. But there may be corner cases in ffmpeg where it doesn't (namely pseudo-pal stuff).
* | vf_rotate: fix params >= 4Gravatar wm42013-06-28
| |
* | options: remove -lavdopts debug suboptionGravatar wm42013-06-28
| | | | | | | | This can be set as avopt instead.
* | cocoa_common: schedule a redraw frame after a non live resizeGravatar Stefano Pigozzi2013-06-25
| | | | | | | | | | | | | | | | | | | | | | A redraw forces recalculation of panscan and other stuff not accounted for in the resize_redraw codepath. This is actually a hack but works really well in my tests. Thanks @wm4 and @Cpuroast for the idea. Fixes #86 [ci skip]
* | Merge branch 'sub_mess2'Gravatar wm42013-06-25
|\ \ | | | | | | | | | ...the return.
| * | stream: remove padding parameter from stream_read_complete()Gravatar wm42013-06-23
| | | | | | | | | | | | | | | | | | | | | | | | Seems like a completely unnecessary complication. Instead, always add a 1 byte padding (could be extended if a caller needs it), and clear it. Also add some documentation. There was some, but it was outdated and incomplete.
* | | OSX: fix compilation with 10.7 SDKGravatar Stefano Pigozzi2013-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent work in the OS X parts of the code started using clang's support for Obj-C's support for Literals and Subscripting. These particular language features remove a lot of boilerplate code and allow to interact with collections as consicely as one would do in scripting languages like Ruby or Python. Even if these are compiler features, Subscripting needs some runtime support. This is provided with libarclite (coming with the compiler), but we need to add the proper method definitions since the 10.7 SDK headers do not include them. That is because 10.7 shipped before this language features. This will cause some warnings when compiling with the 10.7 SDK because the commit also redefines BOOL to make autoboxing/unboxing of BOOL literals to work. If you need to test this for whatever reason on 10.8, just pass in the correct SDK to configure's extra cflags: ./configure --extra-cflags='-mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk' Fixes #117
* | | vo_lavc: remove unused variableGravatar wm42013-06-18
| | |
* | | osdep: remove shmem wrapperGravatar wm42013-06-18
| | | | | | | | | | | | This is unused now that the cache is always threaded.
* | | vo_lavc: do NOT fill pict_type from the mp_imageGravatar Rudolf Polzer2013-06-17
| | | | | | | | | | | | | | | | | | | | | | | | Doing this makes the encoder force the same pict type as original, which is often not even possible. Rather let the codec decide! As there is no documented value to mean "decoder shall pick", I rather save/restore the default value filled by libavcodec.
* | | vo_lavc: use mp_image_copy_fields_to_av_frameGravatar Rudolf Polzer2013-06-17
|/ /
* | fix compile, sorryGravatar Rudolf Polzer2013-06-16
| |
* | encode_lavc strings: use new option syntaxGravatar Rudolf Polzer2013-06-16
| |
* | vf_dlopen filters: add an "ildetect" filter that detects interlacingGravatar Rudolf Polzer2013-06-16
| | | | | | | | | | The filter analyzes each frame for combing, and decides at the end whether the content is likely interlaced, telecined or progressive.
* | cocoa_common: implement VOCTRL_UPDATE_WINDOW_TITLEGravatar Stefano Pigozzi2013-06-16
| | | | | | | | | | Unfortunately this backend creates the window lazily and a call to `cocoa_set_window_title` is needed inside config.
* | wayland: use VOCTRL_UPDATE_WINDOW_TTILEGravatar Alexander Preisinger2013-06-16
| |
* | vo: fix build on LibavGravatar wm42013-06-15
| |
* | video/out: introduce VOCTRL_UPDATE_WINDOW_TITLEGravatar wm42013-06-15
| | | | | | | | | | | | | | | | | | | | | | Instead of implicitly changing the window title on config(), do it as part of the new VOCTRL. At first I wanted to make all VOs use the VOCTRL argument directly, but on a second thought it appears vo_get_window_title() is much more useful for some (namely, if the window is created lazily on first config()). Not all VOs are changed. Wayland and OSX have to follow.
* | vo: define VO_TRUE/FALSE to C99 constantsGravatar wm42013-06-15
| | | | | | | | | | | | | | | | | | This make the intention more apparent, and some VOs are actually using true instead of VO_TRUE in some places. Hopefully this changes makes it less confusing (instead of more). The C99 constants true/false are defined to 1/0 as well, so this commit doesn't actually change anything.
* | w32_common: remove some unneeded codeGravatar wm42013-06-15
| | | | | | | | vo_w32_init() can be called only once on a VO.
* | w32_common: fix non-senseGravatar wm42013-06-15
| | | | | | | | Seriously...
* | vo_xv: always request redraw on resizeGravatar wm42013-06-15
| | | | | | | | Fixes using panscan controls with OSD off and video paused.
* | vo: redo video display rectangle calculationsGravatar wm42013-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code calculates the source/display video rectangle for scaling with most VOs. It's responsible for clipping the display rectangle against the screen and adjusting the source rectangle accordingly. Until now, it assumed that the video was centered on the screen. Change this so that any rectangle is possible. Basically, the clipping is extended to two sides (e.g. left and right), instead of handling both at the same time. The rounding behavior slightly changes. It seems to be slightly better than before. On the other hand, the video is not strictly centered anymore (due to different rounding on either side). When using panscan controls, the video can "jitter" by 1 or 2 pixels around the center as the panscan value is changed.
* | gl_video: rearrange some codeGravatar wm42013-06-15
| | | | | | | | I think this is slightly nicer. Shouldn't change anything functionally.
* | gl_video: fix scaling when image is cropped, or with no-npotGravatar wm42013-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the displayed image is cropped in Y direction (like using panscan controls when playing 4:3 video on a 16:9 monitor), and separated scaling is used, the texture size for the FBO holding the intermediate result was calculated incorrectly. This could lead to artifacts, which were quite apparent with extreme scale factors. Actually, the size of that texture is OK, but the texture shouldn't be used to hold the complete scaled image. Instead, it should be used for the visible part of the image only. Because separate scaling works by scaling in Y direction first, it's still fine to scale the image on the full image width on the first pass. This helps avoiding artifacts on the left/right border of the image when scaling in X direction, as the scaler will try to fetch pixels from beyond the border. (The left border is still kind of fine, but the right border will fetch garbage, unless the texture is strictly sized, or explicit clamping is added to the shader. Too much trouble, so using the full image width is simpler.) Also fix some issues with no-npot mode, which enables use of power-of-2 textures. Maybe this mode isn't really useful anymore (modern hardware is faster with smaller non-power-of-2 textures), but keep it for now.
* | gl_video: typo in commentGravatar wm42013-06-15
| |
* | image_writer: Add PNG filter option (default "mixed")Gravatar Martin Herkt2013-06-15
| | | | | | | | | | | | The use of filters prior to PNG compression can greatly improve compression ratio, with "mixed" (ImageMagick calls it "adaptive") typically achieving the best results.
* | cocoa_common: remove play/pause VOCTRL functionsGravatar Stefano Pigozzi2013-06-14
| | | | | | | | | | Make VOCTRL_RESTORE_SCREENSAVER / VOCTRL_KILL_SCREENSAVER use the power management functions directly.