summaryrefslogtreecommitdiff
path: root/libavfilter/af_afir.c
Commit message (Collapse)AuthorAge
* avfilter/af_afir: remove pts rewriting codePaul B Mahol2022-02-22
| | | | This is not needed at all.
* avfilter/af_afir: switch to lavu/txPaul B Mahol2022-01-29
|
* avfilter: Replace query_formats callback with union of list and callbackAndreas Rheinhardt2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one looks at the many query_formats callbacks in existence, one will immediately recognize that there is one type of default callback for video and a slightly different default callback for audio: It is "return ff_set_common_formats_from_list(ctx, pix_fmts);" for video with a filter-specific pix_fmts list. For audio, it is the same with a filter-specific sample_fmts list together with ff_set_common_all_samplerates() and ff_set_common_all_channel_counts(). This commit allows to remove the boilerplate query_formats callbacks by replacing said callback with a union consisting the old callback and pointers for pixel and sample format arrays. For the not uncommon case in which these lists only contain a single entry (besides the sentinel) enum AVPixelFormat and enum AVSampleFormat fields are also added to the union to store them directly in the AVFilter, thereby avoiding a relocation. The state of said union will be contained in a new, dedicated AVFilter field (the nb_inputs and nb_outputs fields have been shrunk to uint8_t in order to create a hole for this new field; this is no problem, as the maximum of all the nb_inputs is four; for nb_outputs it is only two). The state's default value coincides with the earlier default of query_formats being unset, namely that the filter accepts all formats (and also sample rates and channel counts/layouts for audio) provided that these properties agree coincide for all inputs and outputs. By using different union members for audio and video filters the type-unsafety of using the same functions for audio and video lists will furthermore be more confined to formats.c than before. When the new fields are used, they will also avoid allocations: Currently something nearly equivalent to ff_default_query_formats() is called after every successful call to a query_formats callback; yet in the common case that the newly allocated AVFilterFormats are not used at all (namely if there are no free links) these newly allocated AVFilterFormats are freed again without ever being used. Filters no longer using the callback will not exhibit this any more. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_afir: Free inpads' names genericallyAndreas Rheinhardt2021-08-22
| | | | | 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: 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>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. 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_aiir: remove unused variablePaul B Mahol2020-10-18
|
* 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_afir: Avoid allocating AVFilterPad namesAndreas Rheinhardt2020-08-26
| | | | | | | | If the names are always the same, they need not be duplicated; doing so 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_afir: make use of vector_fmac_scalar() tooPaul B Mahol2020-08-23
|
* avfilter/af_afir: Fix leak of AVFilterChannelLayout in case of errorAndreas Rheinhardt2020-08-20
| | | | | | | | | | | | | If an error happens between the allocation of an AVFilterChannelLayout and its usage (which involves attaching said object to a more permanent object), the channel layout array leaks. This can simply be fixed by making sure that nothing is between the allocation and the aforementioned usage. Fixes Coverity issue #1250334. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavfi/afir: fix vpad.name leakJun Zhao2020-05-30
| | | | | | | Fix vpad.name leak in error path, move the vpad related operation only if enabled show IR frequency response. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avfilter/af_afir: check if frame clone is setPaul B Mahol2020-01-14
|
* avfilter/af_afir: add support for switching impulse response streams at runtimePaul B Mahol2020-01-10
| | | | Currently, switching is not free of artifacts, to be resolved later.
* avfilter/af_afir: add support for even smaller partition sizesPaul B Mahol2020-01-10
|
* avfilter/af_afir: split input frames from impulse response framesPaul B Mahol2020-01-10
|
* avfilter/af_afir: adjust min partition sizePaul B Mahol2019-01-05
| | | | Minimal value allowed by our FFT is 16 thus min partition size is 8.
* avfilter/af_afir: split off fcmul_add into a DSP contextJames Almer2019-01-03
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/af_afir: fix overhead for small partitionsPaul B Mahol2018-12-31
|
* avfilter/af_afir: do not over allocate fft bufferPaul B Mahol2018-12-30
|
* avfilter/af_afir: stop using as much threads as stream have itPaul B Mahol2018-12-30
|
* avfilter/af_afir: optimize code a little morePaul B Mahol2018-12-30
| | | | Avoid memset.
* avfilter/af_afir: implement non-uniform partitioned convolutionPaul B Mahol2018-12-30
| | | | Using multiple frequency delay lines.
* avfilter/af_afir: properly split IR into multiple segmentsPaul B Mahol2018-12-29
|
* avfilter/af_afir: make part_index values per channelPaul B Mahol2018-12-29
|
* avfilter/af_afir: make number of segments extendablePaul B Mahol2018-12-29
|
* avfilter/af_afir: use AVFrame for coeff tooPaul B Mahol2018-12-29
|
* avfilter/af_afir: use segment pointerPaul B Mahol2018-12-29
|
* avfilter/af_afir: introduce uninit_segment() and use itPaul B Mahol2018-12-29
|
* avfilter/af_afir: fix minp/maxp range and change default value for maxpPaul B Mahol2018-12-29
|
* avfilter/af_afir: introduce init_segment() and use itPaul B Mahol2018-12-29
|
* avfilter/af_afir: move allocation stuff where it belongsPaul B Mahol2018-12-29
|
* avfilter/af_afir: introduce AudioFIRSegment structure and use itPaul B Mahol2018-12-29
|
* afilter/af_afir: remove invalid delayPaul B Mahol2018-12-27
|
* avfilter/af_afir: remove not needed nb_samples from filter contextPaul B Mahol2018-12-27
|
* avfilter/af_afir: remove not needed operationsPaul B Mahol2018-12-27
|
* avfilter/af_afir: remove dead store variablePaul B Mahol2018-12-26
|
* avfilter/af_afir: remove unused variablePaul B Mahol2018-12-26
|
* avfilter/af_afir: fix hang because video is first requestedPaul B Mahol2018-11-09
|
* avfilter/af_afir: kill useless code which increases latency for no reasonPaul B Mahol2018-11-09
|
* avfilter/af_afir: add minp/maxp options to control latency and speedPaul B Mahol2018-11-08
|
* avfilter/af_afir: do not leak frame and clear pointer to freed framePaul B Mahol2018-11-08
|
* avfilter/af_afir: implement rate optionPaul B Mahol2018-11-08
|
* avfilter/af_afir: return early when giving video framePaul B Mahol2018-11-08
|
* avfilter/af_afir: remove redundant codePaul B Mahol2018-11-08
|
* avfilter/af_afir: calculate group delay tooPaul B Mahol2018-10-21
|
* avfilter/af_afir: remove again option, merge it with gtypePaul B Mahol2018-10-10
|