summaryrefslogtreecommitdiffstats
path: root/video/filter
Commit message (Collapse)AuthorAgeFilesLines
* vf_lavfi: don't access AVFilterPad directlywm42013-12-181-2/+3
| | | | Direct access is deprecated.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-1731-42/+42
|
* Move options/config related files from mpvcore/ to options/wm42013-12-1726-33/+33
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-162-5/+5
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* vf_dsize: fix bug caused by typowm42013-12-141-1/+1
|
* video: move VO reinit from filter chain to playerwm42013-12-103-117/+34
| | | | | | | | | This gets rid of the vf_vo pseudo-filter. It ends the idea of MPlayer's architecture that the VO is just a (terminating) video filter. It didn't really work for us with respect to video timing (the "end" of the video chain isn't really made for video timing, and making it do so would be awkward), and now we're removing it entirely. We will be able to fix some things, such as properly draining video on reconfiguration.
* video: move handling of brightness and deinterlacing controlwm42013-12-101-27/+0
| | | | | Handling of brightness/gamma/saturation/etc. and deinterlacing is moved from vf_vo.c to dec_video.c.
* vf_vo: remove VO reset on filter uninitwm42013-12-101-5/+0
| | | | | | I don't think this has any reason to exist. It's likely that this used to be required by the old direct rendering infrastructure. (See git blame output.)
* vf: redo conversion filter insertion/format negotiationwm42013-12-076-175/+187
| | | | | | | | | | | | | | | | | Remove the inconsistent, duplicated, and insufficient scale filter insertion code, and do it in one place instead. This also compensates for the earlier removal of vf_match_csp() (which was in fact duplicated code). The algorithm to determine where to insert a filter etc. is probably the same, though it also comes with some changes that should make debugging easier when trying to figure out why a chain is failing to configure. Add an "in" pseudo filter, which makes insertion of conversion filters easier. Also change the vf->reconfig signature. At a later point, I'll probably change format negotiation such that the generic filter code will choose the output format, so having separate in and out params will be useful.
* video/filter: make vf->control non-recursivewm42013-12-0712-32/+27
| | | | | | Reason: I never liked it being recursive. Generally, this seems to cause more problems than trouble, and is less flexible for access outside of the chain.
* vf: remove flags from filter format statuswm42013-12-074-37/+25
| | | | | | | | I don't think we need these flags anymore. Simplify the code and get rid of the vf_format struct. There still is the vf_format.configured field, but this can be replaced by checking for a valid image format.
* video: create a separate context for video filter chainwm42013-12-074-85/+164
| | | | | | This adds vf_chain, which unlike vf_instance refers to the filter chain as a whole. This makes the filter API less awkward, and will allow handling format negotiation better.
* video/filter: remove vf_match_csp()wm42013-12-076-119/+4
| | | | | | | | | This function improves automatic filter insertion, but this really should be done by the generic filter code. Remove vf_match_csp() and all code using it as preparation for that. This commit temporarily makes handling of filter insertion worse for now, but it will be fixed with the following commits.
* vf: remove unused functionwm42013-12-072-23/+0
|
* vf: print error when creating filter failswm42013-12-071-0/+1
| | | | Before that we relied on the filters printing their own error messages.
* vf: declare config() as legacywm42013-12-051-5/+5
|
* video/filter: remove unneeded config callbackswm42013-12-055-45/+0
| | | | | | | | They didn't do anything. vf_screenshot.c actually did release the previous image, but that's not really required. At worst you could take a screenshot and get an old frame when there's no new frame yet.
* video: remove --flipwm42013-12-051-1/+0
| | | | | | | | | | | | | | | | The --flip option flipped the image upside-down, by trying to use VO support, or if not available, by inserting a video filter. I'm not sure why it existed. Maybe it was important in ancient times when VfW based decoders output an image this way (but even then, flipping an image is a free operation by negating the stride). One nice thing about this is that it provided a possible path for implementing video orientation, which is a feature we should probably support eventually. The important part is that it would be for free for VOs that support it, and would work even with hardware decoding. But for now get rid of it. It's useless, trivial, stands in the way, and supporting video orientation would require solving other problems first.
* vf: move norm_qscale() to the only filter which uses itwm42013-12-052-15/+15
|
* vf_sub, vf_dlopen: default struct is not neededwm42013-12-052-7/+3
|
* vf: cleanup removed filter entrywm42013-12-051-1/+0
|
* video/filter: fix some bogus free() callswm42013-12-054-8/+0
| | | | The generic filter code frees these; recent regression.
* options: remove legacy hacks for sub-option handlingwm42013-12-041-17/+8
|
* vf_noise: reduce binary sizewm42013-12-041-4/+1
| | | | Same issues as in previous commit.
* vf_eq: revert unintended binary size increasewm42013-12-041-13/+10
| | | | | | The vf_eq context contains a very large lookup table, and the method of setting default values caused the vf_eq context to be included in the compiled code.
* video/filter: remove legacy option handling hackswm42013-12-0432-37/+35
| | | | | | | | | All filters now either use the generic option parser, or don't have options. This finally finishes a transition started in 2003 (see git commit 33b62af94760186c). Why are MPlayer devs so monumentally lazy? Sorry, but this takes the cake. You had 10 years.
* vf_vo: don't abuse option strings to set VOwm42013-12-042-6/+15
| | | | Whoever thought this was a good idea should be punched.
* vf_rotate: use option parserwm42013-12-041-2/+7
|
* vf_pp: use option parserwm42013-12-041-5/+14
|
* vf_ilpack: use option parserwm42013-12-041-8/+10
|
* vf_eq: use option parserwm42013-12-041-26/+22
|
* vf_dsize: use option parserwm42013-12-041-31/+19
| | | | | | | Mostly backwards compatible, we don't change much because we just want to get rid of the legacy option string handling. You can't pass an aspect as first argument anymore.
* vf_divtc: use option parserwm42013-12-041-78/+36
|
* video/filter: remove vf_down3drightwm42013-12-042-158/+0
| | | | | | | | Apparently you can get this with: stereo3d=ab[2]{l,r}:sbs[2]{l,r} So it seems the filter is redundant and can be removed. Also see FFmpeg commit 2f11aa141a01.
* vf: remove unneeded fieldwm42013-12-041-1/+0
| | | | | This was once required for padding, because many filters didn't use designated initializers, and initialized a removed field with NULL.
* vf_pullup: change options, reroute to vf_lavfiwm42013-12-041-10/+37
| | | | The options are probably mostly backwards compatible.
* vf_unsharp: change options, reroute to vf_lavfiwm42013-12-041-50/+37
|
* vf_phase: change options, reroute to vf_lavfiwm42013-12-041-35/+48
| | | | The option change is probably backwards compatible.
* vf_noise: reroute to vf_lavfiwm42013-12-041-26/+42
| | | | | | | | Unfortunately, this forces filtering both luma and chroma, because otherwise we'd have to deal with libavfilter's vf_noise weird handling of YUV vs. RGB formats. Would we e.g. filter luma only, it would filter red in RGB mode only, because it goes by component and there's no way to distinguish YUV and RGB by just using the filter's options.
* vf_stereo3d: reroute to vf_lavfiwm42013-12-041-10/+31
|
* vf_hqdn3d: change options, reroute to vf_lavfiwm42013-12-041-67/+34
|
* vf_gradfun: reroute to vf_lavfiwm42013-12-041-0/+23
| | | | | Also update the manpage. We changed defaults and added a suboption quite some time ago, and we forgot to update the manpage at all.
* vf_delogo: reroute to vf_lavfiwm42013-12-041-2/+20
| | | | The ``file`` suboption is unsupported on lavfi.
* vf_yadif: change options, reroute to vf_lavfiwm42013-12-041-15/+24
| | | | | | Also remove the ability to disable deinterlacing at runtime. You can still disable deinterlacing at runtime by using the ``D`` key and its automatical filter insertion/removal.
* vf_lavfi: export a wrapper functionwm42013-12-042-6/+156
| | | | | | | | | | | This will allow old filter to run libavfilter instead by calling vf_lw_set_graph(), which turns the filter into a wrapper, using a given libavfilter graph. Later commits use that to automatically "reroute" a bunch of filters to libavfilter. We want to get rid of the old MPlayer filter code, because it's bad an unmaintained, but we still don't want to force everyone to use vf_lavfi, so this solution will do for a while.
* video: remove VFCAP_POSTPROCwm42013-12-041-4/+1
| | | | This wasn't used anymore, not even until recently.
* vf_screenshot: remove unnecessary codewm42013-12-041-5/+0
|
* options: add options that set defaults for af/vf/ao/vowm42013-12-011-0/+2
| | | | | | | | There are some use cases for this. For example, you can use it to set defaults of automatically inserted filters (like af_lavrresample). It's also useful if you have a non-trivial VO configuration, and want to use --vo to quickly change between the drivers without repeating the whole configuration in the --vo argument.
* Take care of some libavutil deprecations, drop support for FFmpeg 1.0wm42013-11-291-2/+2
| | | | | | | | | | | | | | PIX_FMT_* -> AV_PIX_FMT_* (except some pixdesc constants) enum PixelFormat -> enum AVPixelFormat Losen some version checks in certain newer pixel formats. av_pix_fmt_descriptors -> av_pix_fmt_desc_get This removes support for FFmpeg 1.0.x, which is even older than Libav 9.x. Support for it probably was already broken, and its libswresample was rejected by our build system anyway because it's broken. Mostly untested; it does compile with Libav 9.9.
* vf_pullup: properly reset on seekwm42013-11-291-14/+37
| | | | | | | Sometimes, vf_pullup hanged on seek. This was because it never was properly reset. Old timestamps messed up the timestamp calculations, which made the player show frames for a ridiculously long time, which is perceived as pausing or hanging.
* vaapi: remove unused hw image formats, simplifywm42013-11-291-1/+1
| | | | | | | | | | PIX_FMT_VDA_VLD and PIX_FMT_VAAPI_VLD were never used anywhere. I'm not sure why they were even added, and they sound like they are just for compatibility with XvMC-style decoding, which sucks anyway. Now that there's only a single vaapi format, remove the IMGFMT_IS_VAAPI() macro. Also get rid of IMGFMT_IS_VDA(), which was unused.
* video/filter: fix PIC compile on x86Natanael Copa2013-11-262-3/+9
| | | | | | | | | | | | | When using PIC on x86 (eg with hardened toolchains) the ebx register is reserverd and cannot be used in assembly code. For vf_eq we allow the compiler to use memory as input. For vf_noise we temoporarily borrow the ebp register. This fixes #361. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* osd: remove mp_osd_res.video_par fieldwm42013-11-241-1/+0
| | | | | | This is not needed anymore, because we decided that the PAR of the decoded video matters, and not the PAR of the filtered video that arrives at the VO.
* Rename sub.c/.h to osd.c/.hwm42013-11-242-3/+1
| | | | | This was way too misleading. osd.c merely calls the subtitle renderers, instead of actually dealing with subtitles.
* options: print lavfi filter list with --vf=lavfi=helpwm42013-11-231-0/+40
|
* options: implement --pphelp differentlywm42013-11-233-0/+8
| | | | Make it work via --vf=pp:help instead.
* video: remove vf_pp auto-insertionwm42013-11-232-14/+0
| | | | | | | | | | This drops the --pp option, which was probably broken for a while. The option automatically inserted the "pp" filter. The value passed to it was ignored (which is probably broken, it always selected maximal quality). Inserting this filter can be done simply with --vf=pp, so this is not needed anymore.
* video: move struct mp_hwdec_info into its own header filewm42013-11-231-1/+1
| | | | | | | | This means most code accessing this struct must now include hwdec.h instead of dec_video.h. I just put it into dec_video.h at first because I thought a separate file would be a waste, but it's more proper to do it this way, as there are too many files which include dec_video.h only to get the mp_hwdec_info definition.
* vf_vavpp: make it work with vo_opengl and software decodingwm42013-11-221-3/+3
| | | | | | | | | | vo_opengl always loads the hwdec backend lazily, so hwdec_request_api() has to be called to possibly load it. This makes vf_vavpp work with software decoding. (Hardware decoding loads the backend before the filter is initialized, so this case is different.) Also, the VFCTRL_GET_HWDEC_INFO call doesn't need to be checked. If it fails, the info will be left blank.
* configure: uniform the defines to #define HAVE_xxx (0|1)Stefano Pigozzi2013-11-031-4/+4
| | | | | | | | | | | | | | | | | | | | | The configure followed 5 different convetions of defines because the next guy always wanted to introduce a new better way to uniform it[1]. For an hypothetic feature 'hurr' you could have had: * #define HAVE_HURR 1 / #undef HAVE_DURR * #define HAVE_HURR / #undef HAVE_DURR * #define CONFIG_HURR 1 / #undef CONFIG_DURR * #define HAVE_HURR 1 / #define HAVE_DURR 0 * #define CONFIG_HURR 1 / #define CONFIG_DURR 0 All is now uniform and uses: * #define HAVE_HURR 1 * #define HAVE_DURR 0 We like definining to 0 as opposed to `undef` bcause it can help spot typos and is very helpful when doing big reorganizations in the code. [1]: http://xkcd.com/927/ related
* Fix some more -Wshadow warningswm42013-11-012-12/+12
| | | | | | These aren't printed with newer gcc or clang versions for some reason. All of them seem to be about local variables shadowing global functions.
* Enable -Wshadowwm42013-11-012-8/+8
| | | | | | | | | This one really did bite me hard (see previous commit), so enable it by default. Fix some cases of shadowing throughout the codebase. None of these change behavior, and all of these were correct code, and just tripped up the warning.
* video/filter: remove useless vf_info fieldswm42013-10-2333-178/+96
| | | | | This time I didn't bother to move the contents of the author field to the file headers. "git log" is your friend.
* video/out: remove useless info struct and redundant fieldswm42013-10-231-6/+3
| | | | The author and comment fields were printed only in -v mode.
* vf_scale: fix get/set confusionwm42013-10-161-1/+1
| | | | This caused the equalizer controls to appear stuck.
* cosmetics: replace "CTRL" defines by enumswm42013-10-021-13/+15
| | | | Because why not.
* vf_scale: factor out libswscale equalizer controlwm42013-09-301-23/+2
| | | | Will be used by vo_x11.
* vd: move aspect calculation to a functionwm42013-09-262-0/+16
| | | | | | | | This function would probably be useful in other places too. I'm not sure why vd.c doesn't apply the aspect if it changes size by less than 4 pixels. Maybe it's supposed to avoid ugly results with bad scalers if the difference is too small to be noticed normally.
* vaapi: add vf_vavpp and use it for deinterlacingxylosper2013-09-254-0/+413
| | | | | | | | Merged from pull request #246 by xylosper. Minor cosmetic changes, some adjustments (compatibility with older libva versions), and manpage additions by wm4. Signed-off-by: wm4 <wm4@nowhere>
* vf: fix filter initialization error checkwm42013-09-201-1/+1
| | | | | vf_open returns 0 on error, 1 on success. Oops. Accidentally broken with 6629a95.
* video: handle video output levels with mp_image_paramswm42013-08-243-6/+1
| | | | | | | | | | | | Until now, video output levels (obscure feature, like using TV screens that require RGB output in limited range, similar to YUY) still required handling of VOCTRL_SET_YUV_COLORSPACE. Simplify this, and use the new mp_image_params code. This gets rid of some code. VOCTRL_SET_YUV_COLORSPACE is not needed at all anymore in VOs that use the reconfig callback. The result of VOCTRL_GET_YUV_COLORSPACE is now used only used for the colormatrix related properties (basically, for display on OSD). For other VOs, VOCTRL_SET_YUV_COLORSPACE will be sent only once after config instead of twice.
* video/out: don't require VOs to handle screenshot aspect speciallywm42013-08-241-0/+1
| | | | | | | | | | | | | | | | This affects VOs which just reuse the mp_image from draw_image() to return screenshots. The aspect of these images is never different from the aspect the screenshots should be, so there's no reason to adjust the aspect in these cases. Other VOs still need it in order to restore the original image attributes. This requires some changes to the video filter code to make sure that the aspect in the passed mp_images is consistent. The changes in mplayer.c and vd_lav