summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf.h
Commit message (Collapse)AuthorAgeFilesLines
* core, vo: modify OSD redraw architecture, support EOSDUoti Urpala2011-12-061-1/+0
| | | | | | | | | | | | | | | | Previously the core sent VFCTRL_REDRAW_OSD to change OSD contents over the current frame. Change this to VFCTRL_REDRAW_FRAME followed by normal EOSD and OSD drawing calls, then vo_flip_page(). The new version supports changing EOSD contents for libass-rendered subtitles and simplifies the redraw support code needed per VO. vo_xv doesn't support EOSD changes because it relies on vf_ass to render EOSD contents earlier in the filter chain. vo_xv logic is additionally simplified because the previous commit removed the need to track the status of current and next images separately (now each frame is guaranteed to become "visible" soon after we receive it as "next", with no VO code running in the interval between).
* Merge branch 'screenshot' (early part)Uoti Urpala2011-11-251-1/+7
|\
| * core: add infrastructure to get screenshots from VOswm42011-11-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a VO command (VOCTRL_SCREENSHOT) which requests a screenshot directly from the VO. If VO support is available, screenshots will be taken instantly (no more 1 or 2 frames delay). Taking screenshots when hardware decoding is in use will also work (vdpau). Additionally, the screenshots will now use the same colorspace as the video display. Change the central MPContext to be allocated with talloc so that it can be used as a talloc parent context. This commit does not yet implement the functionality for any VO (added in subsequent commits). The old screenshot video filter is not needed anymore if VO support is present, and in that case will not be used even if it is present in the filter chain. If VO support is not available then the filter is used like before. Note that the filter still has some of the old problems, such as delaying the screenshot by at least 1 frame.
* | cosmetics: vf.[ch]: reformatUoti Urpala2011-11-141-73/+72
|/ | | | Also a couple of smaller changes to other files.
* video, options: implement better YUV->RGB conversion controlwm42011-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite control of the colorspace and input/output level parameters used in YUV-RGB conversions, replacing VO-specific suboptions with new common options and adding configuration support to more cases. Add new option --colormatrix which selects the colorspace the original video is assumed to have in YUV->RGB conversions. The default behavior changes from assuming BT.601 to colorspace autoselection between BT.601 and BT.709 using a simple heuristic based on video size. Add new options --colormatrix-input-range and --colormatrix-output-range which select input YUV and output RGB range. Disable the previously existing VO-specific colorspace and level conversion suboptions in vo_gl and vo_vdpau. Remove the "yuv_colorspace" property and replace it with one named "colormatrix" and semantics matching the new option. Add new properties matching the options for level conversion. Colorspace selection is currently supported by vo_gl, vo_vdpau, vo_xv and vf_scale, and all can change it at runtime (previously only vo_vdpau and vo_xv could). vo_vdpau now uses the same conversion matrix generation as vo_gl instead of libvdpau functionality; the main functional difference is that the "contrast" equalizer control behaves somewhat differently (it scales the Y component around 1/2 instead of around 0, so that contrast 0 makes the image gray rather than black). vo_xv does not support level conversion. vf_scale supports range setting for input, but always outputs full-range RGB. The value of the slave properties is the policy setting used for conversions. This means they can be set to any value regardless of whether the current VO supports that value or whether there currently even is any video. Possibly separate properties could be added to query the conversion actually used at the moment, if any. Because the colorspace and level settings are now set with a single VF/VO control call, the return value of that is no longer used to signal whether all the settings are actually supported. Instead code should set all the details it can support, and ignore the rest. The core will use GET_YUV_COLORSPACE to check which colorspace details have been set and which not. In other words, the return value for SET_YUV_COLORSPACE only signals whether any kind of YUV colorspace conversion handling exists at all, and VOs have to take care to return the actual state with GET_YUV_COLORSPACE instead. To be changed in later commits: add missing option documentation.
* vf_*: fix pts values passed to the next filterRudolf Polzer2011-04-241-0/+16
| | | | | | | | | | | | Many video filters failed to calculate or even just pass through pts values for their output frames. Fix this, and also make the two remaining filters that called vf_next_put_image() twice for the same input frame (vf_softpulldown, vf_telecine) use vf_queue_frame() so that e.g. framestepping properly sees both frames. Changed filters: vf_bmovl, vf_detc, vf_divtc, vf_filmdint, vf_ivtc, vf_lavc, vf_phase, vf_pullup, vf_softpulldown, vf_telecine, vf_tile, vf_tinterlace.
* cleanup: move MP_NOPTS_VALUE definition to mpcommon.hUoti Urpala2011-01-151-4/+1
|
* subtitles: move global ass_track to struct osd_stateUoti Urpala2011-01-151-2/+2
|
* cosmetics: remove "_s" prefix from "struct vf_info_s"Uoti Urpala2010-11-021-1/+1
|
* cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-291-17/+17
| | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* Merge svn changes up to r30683Uoti Urpala2010-03-101-1/+1
|\
| * Rename open() vf initialization function to vf_open().diego2010-02-211-1/+1
| | | | | | | | | | | | | | This avoids clashes with fcntl.h under certain circumstances. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30680 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30463Uoti Urpala2010-03-091-0/+33
|\| | | | | | | | | | | Note that r30455 is wrong, that commit does not in fact change the default behavior as claimed in the commit message. It only breaks "-af-adv force=0", which was already pretty much useless though.
| * Add missing license headers to all files in the libmpcodecs directory.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30463 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Support more qscale types in most post-processing filters.reimar2010-01-291-0/+15
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30454 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Avoid misleading error "ASS: cannot add video filter"Uoti Urpala2010-01-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using libass with a VO that has direct EOSD support the vf_ass video filter is unnecessary and is not added automatically, but the code that adds the filter when it is needed produced misleading output messages in this case. The following two messages were printed at MSGL_ERR level, making it look like an error condition: Couldn't open video filter 'ass'. ASS: cannot add video filter Add a version of vf_open_plugin() called vf_open_plugin_noerr() that does not itself print an error message if opening a vf fails and that returns the exact status code returned by the vf open() function. Make vf_ass return a different status code depending on whether there was an actual error or if it determined a filter would be redundant. Use the _noerr function in the code adding the filter to avoid the first message and check the status code to avoid the second.
* | Add yuv_colorspace property, implemented in vo_vdpau and vo_xvUoti Urpala2009-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a property to select YUV colorspace. Currently implemented only in vo_vdpau and vo_xv. Allows switching between BT.601, BT.709 and SMPTE-240M (vdpau only). The xv support uses the "XV_ITURBT_709" attribute. At least my NVIDIA card supports that; I don't know whether other xv implementations do. Bind the colorspace switch to the 'c' key by default. 'c' is currently used by vo_sdl for some fullscreen mode change thing, but at the moment that does not conflict and if it will in the future then vo_sdl can change. VDPAU part based on a patch from Lauri Mylläri <lauri.myllari@gmail.com>
* | vf: Remove unused VFCTRL_FLIP_PAGEUoti Urpala2009-10-211-1/+0
| | | | | | | | | | Nothing uses it under MPlayer any more, and under MEncoder it never had any effect.
* | core/VO: Allow VO drivers to add/modify framesUoti Urpala2009-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add interfaces to allow VO drivers to add or remove frames from the video stream and to alter timestamps. Currently this functionality only works with in correct-pts mode. Use the new functionality in vo_vdpau to properly support frame-adding deinterlace modes. Frames added by the VDPAU deinterlacing code are now properly timed. Before every second frame was always shown immediately (probably next monitor refresh) after the previous one, even if you were watching things in slow motion, and framestepping didn't stop at them at all. When seeking the deinterlace algorithm is no longer fed a mix of frames from old and new positions. As a side effect of the changes a problem with resize events was also fixed. Resizing calls video_to_output_surface() to render the frame at the new resolution, but before this function also changed the list of history frames, so resizing could give an image different from the original one, and also corrupt next frames due to them seeing the wrong history. Now the function has no such side effects. There are more resize-related problems though that will be fixed in a later commit. The deint_mpi[] list of reserved frames is increased from 2 to 3 entries for reasons related to the above. Having 2 entries is enough when you initially get a new frame in draw_image() because then you'll have those two entries plus the new one for a total of 3 (the code relied on the oldest mpi implicitly staying reserved for the duration of the call even after usage count was decreased). However if you want to be able to reproduce the rendering outside draw_image(), relying on the explicitly reserved list only, then it needs to store 3 entries.
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-1/+1
| |
* | Merge svn changes up to r28610Uoti Urpala2009-02-161-0/+3
|\|
| * Add MP_IMGTYPE_NUMBERED which gives access to the kind of mp_image_t thatreimar2009-02-141-0/+3
| | | | | | | | | | | | | | | | | | are numbered and have a "in use" flag which is necessary for proper buffer management as e.g. H.264 direct-rendering needs and is already used successfully for the -vo vdpau work-in-progress. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28550 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid flickering OSD with -vf yadif=1reimar2008-12-301-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28209 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Update OSD while pausedUoti Urpala2008-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | When OSD contents change while paused, try to change the OSD drawn in the currently visible frame. If such OSD updates are not supported then advance by one frame and draw the OSD normally. Add some support for OSD redrawing to vo xv. The new xv code makes a copy of the original frame contents before drawing the OSD if MPlayer is already paused when the frame is drawn. If such a copy of the current frame exists then the frame contents can be restored and a different OSD drawn on top of the same frame.
* | Create a context struct for OSD stateUoti Urpala2008-06-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit creates the struct and passes it to some functions that needs to access OSD state but does not yet move much data from globals to it. vf_expand accesses the OSD state for rendering purposes outside of the normal OSD draw time. The way this currently works is suboptimal, but I did not attempt to clean it up now. To keep things working the same way vf_expand needs to know the address of the state object to be able to access the data even in the functions that should normally not need it. For that purpose this commit adds a VFCTRL to tell vf_expand the address of the object.
* | Move vf_settings to options structUoti Urpala2008-04-261-1/+2
| |
* | Remove _s/_st suffix from some struct namesUoti Urpala2008-04-251-19/+19
| | | | | | | | | | Since the names are always used after the keyword "struct" having a suffix as in "struct demuxer_st" is almost completely pointless.
* | Add option pointer to vf structUoti Urpala2008-04-231-3/+5
|/
* Add necessary header #includes to fix 'make checkheaders'.diego2008-03-061-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26179 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add MPLAYER_ prefix to multiple inclusion guards.diego2008-02-221-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add multiple inclusion guards to all header files that lack them.diego2008-01-011-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25581 b3059339-0415-0410-9bf9-f77b7e298cf2
* vf_equalizer_t string is constantreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25251 b3059339-0415-0410-9bf9-f77b7e298cf2
* stage 1 of applying const to vf structsrfelker2007-11-091-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24996 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove long-deprecated -vop option.diego2006-12-021-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21446 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix incorrect function pointer definition.uau2006-11-221-1/+1
| | | | | | | | No call was made using this prototype directly so this just fixes compiler warnings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21179 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add deinterlace property, patch by Carl Eugen Hoyosreimar2006-11-171-0/+2
| | | | | | | | (cehoyos [at] rainbow studorg tuwien ac at) with small modifications by me. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20989 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use vf control for reading pts from vf_vouau2006-11-141-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20922 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add VFCTRL_DRAW_EOSD.eugeni2006-08-241-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19527 b3059339-0415-0410-9bf9-f77b7e298cf2
* Marks several string parameters as const when they are not modified in the ↵reynaldo2006-07-091-3/+3
| | | | | | function, Patch by Stefan Huehner, stefan AT huehner-org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18985 b3059339-0415-0410-9bf9-f77b7e298cf2
* Initial libass release (without mencoder support).eugeni2006-07-071-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18942 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a new video pts tracking mode, enabled by option -correct-pts.uau2006-07-061-0/+4
| | | | | | | | | | | | | | This mode has the following differences: - Video timing is correct for streams with B frames, at least with some demuxers. - Video filters can modify frame timestamps and insert new frames, and removing frames is handled better than before. - Some things are known to break, it's not usable as the default yet. Things should work as before when the -correct-pts option is not used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18922 b3059339-0415-0410-9bf9-f77b7e298cf2
* passing pts through the filter layer (lets see if pts or cola comes out at ↵michael2006-03-211-2/+6
| | | | | | the end) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17907 b3059339-0415-0410-9bf9-f77b7e298cf2
* Patch by Stefan Huehner / stefan % huehner ! org \rathann2006-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | patch replaces '()' for the correct '(void)' in function declarations/prototypes which have no parameters. The '()' syntax tell thats there is a variable list of arguments, so that the compiler cannot check this. The extra CFLAG '-Wstrict-declarations' shows those cases. Comments about a similar patch applied to ffmpeg: That in C++ these mean the same, but in ANSI C the semantics are different; function() is an (obsolete) K&R C style forward declaration, it basically means that the function can have any number and any types of parameters, effectively completely preventing the compiler from doing any sort of type checking. -- Erik Slagter Defining functions with unspecified arguments is allowed but bad. With arguments unspecified the compiler can't report an error/warning if the function is called with incorrect arguments. -- Måns Rullgård git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
* screenshot filterhenry2005-09-111-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16447 b3059339-0415-0410-9bf9-f77b7e298cf2
* fixes for encoding of multiple fileshenry2005-03-011-0/+9
| | | | | | | | | | - do not uninitialize video encoder between files - checks for image size & format change moved from mencoder.c to vfilters by Oded Shimon <ods15@ods15.dyndns.org> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14879 b3059339-0415-0410-9bf9-f77b7e298cf2
* add the flip filter at the end of the filter chain.reimar2004-12-181-0/+1
| | | | | | | Fixes -vf pp -flip and the flip option in the Gui. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14184 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix image dimensions at filter config timehenry2004-12-011-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14074 b3059339-0415-0410-9bf9-f77b7e298cf2
* add new control message, that is send after end of stream, to flush all ↵iive2004-10-091-0/+1
| | | | | | | | | remaining frames in the video system required by xvid4 encoder. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13594 b3059339-0415-0410-9bf9-f77b7e298cf2
* soft skipping for mencoder. rather than skipping decoding/filteringrfelker2004-04-281-0/+1
| | | | | | | | | | | | | | frames that will be skipped, mencoded tells vf_softskip (if present) that it should drop the next frame. this allows filters that need to see every input frame (inverse telecine, denoise3d, ...) to see skipped frames before they get dropped. in principle, a smarter softskip filter could be written that would buffer frames and choose to drop the one with least change, rather than strictly dropping the next one. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12338 b3059339-0415-0410-9bf9-f77b7e298cf2
* forgot this, needed for vf_hardduprfelker2004-04-281-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12336 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix segfaults with slices. support slice rendering into a filter evenrfelker2003-05-201-0/+1
| | | | | | | | when the following filter/vo doesn't support slices. also use unified vf->dmpi rather than having vf->priv->dmpi duplicated in every filter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10141 b3059339-0415-0410-9bf9-f77b7e298cf2
* sort of a hack, but at least this lets the framerate-increasingrfelker2003-05-031-0/+1
| | | | | | | filters work in mplayer, albeit without proper timing... git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10053 b3059339-0415-0410-9b