summaryrefslogtreecommitdiff
path: root/libavfilter/vf_eq.c
Commit message (Collapse)AuthorAge
* avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilterAndreas Rheinhardt2021-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, an AVFilter's lists of input and output AVFilterPads were terminated by a sentinel and the only way to get the length of these lists was by using avfilter_pad_count(). This has two drawbacks: first, sizeof(AVFilterPad) is not negligible (i.e. 64B on 64bit systems); second, getting the size involves a function call instead of just reading the data. This commit therefore changes this. The sentinels are removed and new private fields nb_inputs and nb_outputs are added to AVFilter that contain the number of elements of the respective AVFilterPad array. Given that AVFilter.(in|out)puts are the only arrays of zero-terminated AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads are not zero-terminated and they already have a size field) the argument to avfilter_pad_count() is always one of these lists, so it just has to find the filter the list belongs to and read said number. This is slower than before, but a replacement function that just reads the internal numbers that users are expected to switch to will be added soon; and furthermore, avfilter_pad_count() is probably never called in hot loops anyway. This saves about 49KiB from the binary; notice that these sentinels are not in .bss despite being zeroed: they are in .data.rel.ro due to the non-sentinels. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/formats: Factor common function combinations outAndreas Rheinhardt2021-08-13
| | | | | | | | | | | Several combinations of functions happen quite often in query_format functions; e.g. ff_set_common_formats(ctx, ff_make_format_list(sample_fmts)) is very common. This commit therefore adds functions that are equivalent to commonly used function combinations in order to reduce code duplication. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: Constify all AVFiltersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: add D2TS, TS2D, TS2T as a common macro in internal.hLimin Wang2020-06-19
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* remove CHAR_MIN/CHAR_MAX usagePaul B Mahol2020-03-17
| | | | It is not needed at all.
* avfilter/vf_eq: cosmeticsLimin Wang2020-01-14
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/eq: enable runtime change flagJun Zhao2020-01-13
| | | | | | enable runtime change flag Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avfilter: add av_cold where it is missingPaul B Mahol2019-10-03
|
* checkasm/vf_eq: add test for vf_eqTing Fu2019-09-26
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Ruiling Song <ruiling.song@intel.com>
* avfilter: do not leak AVFrame on failed buffer allocationPaul B Mahol2017-06-24
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: do not use AVFrame accessorMuhammad Faiz2017-04-23
| | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* lavfi: split frame_count between input and output.Nicolas George2016-11-13
| | | | | | | | | | | | AVFilterLink.frame_count is supposed to count the number of frames that were passed on the link, but with min_samples, that number is not always the same for the source and destination filters. With the addition of a FIFO on the link, the difference will become more significant. Split the variable in two: frame_count_in counts the number of frames that entered the link, frame_count_out counts the number of frames that were sent to the destination filter.
* Timeline function for the eq filterIlya872016-06-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-27
| | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avfilter/vf_eq: Support contrast from -1000 to 1000Michael Niedermayer2015-07-16
| | | | | | Fixes "-vf eq=0.05,eq=20" Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/eq: rework expression evaluationarwa arif2015-03-20
| | | | | | | | | | | In particular, add support for t, pos, n, r parameters, and add an eval mode option. Also, partially reword option documentation. With several major edit by Stefano Sabatini. Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* lavfi/eq: factorize code in process_command()Stefano Sabatini2015-03-20
|
* avfilter: handle error in query_formats() of a bunch of random video filtersClément Bœsch2015-03-16
|
* lavfi/eq: clarify error message in case of expression parsing errorStefano Sabatini2015-03-15
|
* avfilter/vf_eq: Add process_command to eq.Arwa Arif2015-02-20
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_eq: mark src as constMichael Niedermayer2015-01-27
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_eq: Fix clipping codeMichael Niedermayer2015-01-26
| | | | | Found-by: Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_eq: fix leak of input framePaul B Mahol2015-01-26
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: Port mp=eq/eq2 to lavfiArwa Arif2015-01-26
Code adapted from James Darnley's port Some fixes from Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>