summaryrefslogtreecommitdiff
path: root/libavfilter/af_adelay.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/af_adelay: make per channel delay argument an int64_tJames Almer2021-04-25
| | | | | | Should fix ticket #9196 Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/af_adelay: Check sscanf() return valueLimin Wang2020-05-01
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/af_adelay: fix buggy behaviourPaul B Mahol2019-10-09
|
* avfilter/af_adelay: add option which changes how unset channels are delayedPaul B Mahol2019-10-07
| | | | Fixes #8032.
* avfilter/af_adelay: allow setting delays in secondsPaul B Mahol2019-01-01
|
* avfilter/af_adelay: use av_sscanf()Paul B Mahol2018-11-18
|
* avfilter/af_adelay: switch to activatePaul B Mahol2018-10-25
| | | | Also use less memory in special case when all channels have common delay.
* avfilter/af_adelay: do not crash if allocation of chandelay failedPaul B Mahol2018-10-18
|
* avfilter: pass outlink to ff_get_audio_buffer()Paul B Mahol2018-01-03
| | | | | | This is more correct. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_adelay: remove requirement that at least one delay should be ↵Paul B Mahol2017-08-30
| | | | | | | | provided Such requirement is not necessary and code works without it just fine. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_adelay: make it possible to delay channels by exact number of ↵Paul B Mahol2016-08-11
| | | | samples
* avfilter: do not leak frame if ff_get_audio_buffer() failsPaul B Mahol2015-11-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* 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: handle error in query_formats() in bunch of filtersPaul B Mahol2015-04-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_adelay: use av_freep(), do not leave stale pointers in memoryMichael Niedermayer2014-10-07
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter: remove superflous linesPaul B Mahol2014-02-26
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* 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: add adelay filterPaul B Mahol2013-09-16
Signed-off-by: Paul B Mahol <onemda@gmail.com>