summaryrefslogtreecommitdiff
path: root/libavfilter/af_anequalizer.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/avfilter: Remove unused feature to add pads in the middleAndreas Rheinhardt2021-08-17
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/internal: Replace AVFilterPad.needs_writable by flagsAndreas Rheinhardt2021-08-17
| | | | | | | It will be useful in the future when more flags are added. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/internal: Factor out executing a filter's execute_funcAndreas Rheinhardt2021-08-15
| | | | | | | The current way of doing it involves writing the ctx parameter twice. 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/af_anequalizer: add timeline and slice supportPaul B Mahol2020-12-01
|
* lavfi: regroup formats lists in a single structure.Nicolas George2020-09-08
| | | | | | | | | | | | | | | It will allow to refernce it as a whole without clunky macros. Most of the changes have been automatically made with sed: sed -i ' s/-> *in_formats/->incfg.formats/g; s/-> *out_formats/->outcfg.formats/g; s/-> *in_channel_layouts/->incfg.channel_layouts/g; s/-> *out_channel_layouts/->outcfg.channel_layouts/g; s/-> *in_samplerates/->incfg.samplerates/g; s/-> *out_samplerates/->outcfg.samplerates/g; ' src/libavfilter/*(.)
* avfilter/af_anequalizer: Don't allocate outpad namesAndreas Rheinhardt2020-08-26
| | | | | | | | These names are always the same, so not using duplicates saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_anequalizer: Fix memleak when inserting pad failsAndreas Rheinhardt2020-08-26
| | | | | | | | | | It has been forgotten to free the name of the second outpad if attaching the first one to the AVFilterContext fails. Fixing this is easy: Only prepare the second outpad after (and if) the first outpad has been successfully attached to the AVFilterContext. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_anequalizer: fix off by one in reallocationPaul B Mahol2020-03-14
|
* avfilter/af_anequalizer: check if frame clone is setPaul B Mahol2020-01-14
|
* lavfi/anequalizer: fix memory leak in error handling pathJun Zhao2019-09-11
| | | | | | | free the pad.name in error handling path to avoid memory leak. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avfilter/af_anequalizer: check return value of ff_insert_outpad()Paul B Mahol2018-09-15
|
* all: move ff_exp10, ff_exp10f, ff_fast_powf to lavu/ffmath.hGanesh Ajjanagadde2016-03-22
| | | | | | | | | | | The idea is to use ffmath.h for internal implementations of math functions. Currently, it is used for variants of libm functions, but is by no means limited to such things. Note that this is not exported; use lavu/mathematics for such purposes. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
* avfilter/af_anequalizer: Avoid loss of precision when calculating nyquist ↵Michael Niedermayer2016-02-12
| | | | | | | | | | frequency Fixes: CID1351398 Fixes: CID1351400 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_anequalizer: Fix memleak of argsMichael Niedermayer2016-02-08
| | | | | | Fixes CID1351355 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/af_anequalizer: replace pow(x,-2) by 1/(x*x)Ganesh Ajjanagadde2015-12-28
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/af_anequalizer: replace pow(10,x) by ff_exp10(x)Ganesh Ajjanagadde2015-12-28
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/af_anequalizer: remove cabs, cexp dependenciesGanesh Ajjanagadde2015-12-28
| | | | | | | | | Replaces by real arithmetic. Tested the validity of these transformations separately. Numerical differences are ~1e-15, and should not matter: it is not even clear which is more precise mathematically. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avfilter/af_anequalizer: make cliping filter type actually usefulPaul B Mahol2015-12-25
| | | | | | Previously result was ignored. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_anequalizer: use pow instead of exp10Paul B Mahol2015-12-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: add high-order parametric multiband equalizer filterPaul B Mahol2015-12-25
Signed-off-by: Paul B Mahol <onemda@gmail.com>