summaryrefslogtreecommitdiff
path: root/libavfilter/af_astats.c
Commit message (Collapse)AuthorAge
* avfilter/af_astats: add entropy statPaul B Mahol2021-09-11
|
* avfilter/af_astats: remove invalid 5x factor in window size calculationPaul B Mahol2021-08-21
| | | | | Also allow smaller window sizes, and change histogram for noise floor calculation to uint64_t type.
* 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/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/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/af_astats: Only print header lines when values are to be printedTobias Rapp2021-07-14
| | | | | | | | Avoids empty "Channel" or "Overall" header lines added to log output when measurement is restricted to one scope using "measure_perchannel=none" or "measure_overall=none". Signed-off-by: Tobias Rapp <t.rapp@noa-archive.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_astats: fix possible crash because of undefined float to integer ↵Marton Balint2021-01-23
| | | | | | | | rounding Fixes ticket #9049. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_astats: clip input value to prevent overflowPaul B Mahol2021-01-04
|
* avfilter/af_astats: add noise floor count statPaul B Mahol2020-04-17
|
* avfilter/af_astats: add slice threading supportPaul B Mahol2020-04-17
|
* avfilter/af_astats: measure noise floorPaul B Mahol2020-04-17
|
* avfilter/af_astats: fix calculations involving last samplePaul B Mahol2019-05-12
|
* avfilter/af_astats: fix initial values of variablesPaul B Mahol2019-05-12
|
* avfilter/af_astats: fix msvc compile errorMatthias Troffaes2019-04-29
| | | | | | MSVC requires an explicit cast from void * to void when applying the ternary conditional operator to switch between methods that return void.
* avfilter/af_astats: count number of NaNs/Infs/denormals for floating-point ↵Paul B Mahol2019-04-26
| | | | audio too
* avfilter/af_astats: add support for optimized min/max/peak calculationMarton Balint2019-03-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_astats: rework sample loopsMarton Balint2019-03-21
| | | | | | | The channel loop is now the outer loop for both planar and interleaved. This is needed by the next patch, and the speed difference is negligable if any. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_astats: factorize sample loopsMarton Balint2019-03-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_astats: fix identationMarton Balint2019-03-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_astats: add support for selecting measured statisticsMarton Balint2019-03-21
| | | | | | | | | | | set_metadata with many entries is not very efficient, and with small audio frames the performance loss is noticable. Also with this very simple calculations (like peak) can be even further optimized. Unfoturnately there are some small differences in metadata and av_log info output, so factorizing calculations and output might not worth the hassle. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_astats: count zero crossingsPaul B Mahol2018-09-17
|
* avfilter/af_astats: measure dynamic rangePaul B Mahol2017-07-19
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: do not overwrite already set values when doing resetPaul B Mahol2017-07-19
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: don't anonymously typedef structsPaul B Mahol2017-05-13
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: add RMS difference tooPaul B Mahol2017-05-12
| | | | 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>
* avfilter/af_astats: fix flt(p) supportPaul B Mahol2016-08-18
|
* avfilter/af_astats: add support for s64(p) sample formatPaul B Mahol2016-08-18
|
* avfilter/af_astats: add support for other sample formatsPaul B Mahol2016-08-15
|
* avfilter/af_astats: extend bitdepth calculationPaul B Mahol2016-08-03
|
* avfilter/af_astats: do not clear previous sample valuePaul B Mahol2016-02-26
| | | | | | Should help when using reset=1 and metadata=1 Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: clear all statsPaul B Mahol2016-02-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: reset stats prior not after filteringPaul B Mahol2016-02-24
| | | | | | This way stats printed at uninit are also useful. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: replace FFABS with fabsGanesh Ajjanagadde2015-10-13
|
* avfilter: use ff_all_channel_counts() instead of ff_all_channel_layouts()Paul B Mahol2015-09-12
| | | | | | Fixes playback of some files with ffplay. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/astats: use AV_OPT_TYPE_BOOL for metadata optionClément Bœsch2015-09-08
|
* avfilter/af_astats: use UINT64_C instead of the LLU suffixJames Almer2015-07-20
| | | | | | Should fix compilation with vs2012 Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/af_astats: measure minimal and mean difference between two ↵Paul B Mahol2015-07-17
| | | | | | consecutive samples Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: make sure p->last is actually always set when measuring ↵Paul B Mahol2015-07-15
| | | | | | max difference Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: also measure maximal difference between two consecutive ↵Paul B Mahol2015-07-15
| | | | | | | | samples While here also mention bit depth in documentation. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: calculate audio bit-depthPaul B Mahol2015-07-15
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: implement recalculation of stats after each X framesPaul B Mahol2015-07-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: export metadataPaul B Mahol2015-07-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: handle error in query_formats() in bunch of filtersPaul B Mahol2015-04-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: redo zero channel handlingPaul B Mahol2015-03-08
| | | | | Suggested-by: Nicolas George Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: Avoid Zero division in print part.Martin Vignali2015-03-08
|
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: do not export the filters from shared objects Conflicts: libavfilter/af_amix.c libavfilter/af_anull.c libavfilter/asrc_anullsrc.c libavfilter/f_select.c libavfilter/f_settb.c libavfilter/split.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_colorbalance.c libavfilter/vf_copy.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_drawbox.c libavfilter/vf_format.c libavfilter/vf_framestep.c libavfilter/vf_frei0r.c libavfilter/vf_hflip.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_null.c libavfilter/vf_overlay.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_vflip.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter: various cosmeticsPaul B Mahol2013-09-12
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_astats: rename stat()Michael Niedermayer2013-06-03
| | | | | See CID1026741 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>