summaryrefslogtreecommitdiff
path: root/libavfilter
Commit message (Collapse)AuthorAge
* avfilter/af_dynaudnorm: add support for filtering non-writable framesPaul B Mahol2021-10-05
| | | | | Previously it would continue processing frame even if call to make frame writable failed.
* avfilter/af_dynaudnorm: fix possible clipping at start when alt-boundary ↵Paul B Mahol2021-10-05
| | | | mode is disabled
* avfilter/af_speechnorm: fix possible memleak on error to make frame writablePaul B Mahol2021-10-05
| | | | Fix this by adding support for non-writable frames.
* avfilter/vf_morpho: Fix invalid frees on errorAndreas Rheinhardt2021-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code used a pointer to an array (of arrays) that is offset relative to the start of the actually allocated buffer. Yet offsetting the pointer is only done on success, whereas the freeing code believes it to have happened even on error. So if any of the subarrays (or the subarrays' subarrays) can't be successfully allocated, one gets a bad free in free_lut(). Furthermore, said offsetting is only permissible in case the offsetted pointer points in the allocated buffer (here: in case the LUT's min_r is <= 0), as pointer arithmetic is undefined in case it exceeds the allocated object. Moreover, in case one of the subarrays couldn't be allocated, the code nevertheless tried to free the subarray's subarrays; and in case one of the subarray's subarrays could not be allocated successfully, there will be an invalid free, too, because the pointers for the subarrays' subarrays are also offset compared to the base pointer. This commit fixes all of this, by using the actually allocated pointer for freeing and by adding appropriate checks before freeing the subarrays. The former also allows to distinguish the cases in which the lut is currently only half-allocated due to an error in an earlier allocation attempt from the success case. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_morpho: Take pre-padding into account for LUT-reallocationAndreas Rheinhardt2021-10-04
| | | | | | | Fixes heap-buffer underflows. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_morpho: Factor out (re)allocating lutAndreas Rheinhardt2021-10-04
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_morpho: Fix leak of output frame on errorAndreas Rheinhardt2021-10-04
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Make ff_tlog_ref() staticAndreas Rheinhardt2021-10-03
| | | | | | | | | It allows compilers to inline the one and only call to this function in its caller or even to optimize it away completely (this function is empty in case TRACE is not defined). Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_afwtdn: add internal timeline supportPaul B Mahol2021-10-03
|
* avfilter/vf_morpho: switch to internal timelinePaul B Mahol2021-10-03
|
* avfilter/af_agate: switch to internal timelinePaul B Mahol2021-10-03
|
* avfilter/af_afftdn: switch to internal timelinePaul B Mahol2021-10-03
|
* avfilter/x86/vf_blend: unify indentation formatWu Jianhua2021-10-03
| | | | Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter/f_reverse: add missing S64(P) sample format supportPaul B Mahol2021-10-02
|
* avfilter: add (a)latency filtersPaul B Mahol2021-10-02
|
* avfilter/af_afade: Remove impossible branchAndreas Rheinhardt2021-10-02
| | | | | | | | Also don't call ff_inlink_queued_samples() unnecessarily often. Fixes Coverity issue 1427665. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/formats: Update outdated commentAndreas Rheinhardt2021-10-02
| | | | | | Forgotten in 06754f7bbf341062581accc27b5cce353e99fd82. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/formats: Don't unnecessarily reget pixfmt descriptorAndreas Rheinhardt2021-10-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/f_reverse: Don't use redundant query_formats functionAndreas Rheinhardt2021-10-02
| | | | | | | | | Said function did exactly what ff_default_query_formats() does for audio; so just remove it, so that ff_default_query_formats() will be called. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Remove unused bufferAndreas Rheinhardt2021-10-02
| | | | | | | | Unused since the removal of ff_get_ref_perms_string() in a05a44e205d6ae13d5eb1cd8d4ad2dba6ec940b3. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfiltergraph: Remove always-true checkAndreas Rheinhardt2021-10-02
| | | | | | Always true since bc1a985ba030e9861d24965d42792850b43a43ea. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfiltergraph: Free AVFilterGraph options properlyAndreas Rheinhardt2021-10-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfiltergraph: Simplify adding filter to graphAndreas Rheinhardt2021-10-02
| | | | | | | | | | By reallocating the array of pointers to the AVFilterContexts before allocating the new AVFilterContext one can avoid freeing the new AVFilterContext in case the array could not be reallocated. Also switch to av_realloc_array() while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_codecview: added new options for blockLimin Wang2021-10-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_avgblur: switch to faster algorithmPaul B Mahol2021-09-30
|
* avfilter/vf_blend: add few more modesPaul B Mahol2021-09-30
|
* avfilter/vf_blend: add harmonic modePaul B Mahol2021-09-29
|
* avfilter/vf_blend: add geometric modePaul B Mahol2021-09-29
|
* avfilter/vf_morpho: add tophat and blackhat operationsPaul B Mahol2021-09-29
|
* avfilter/vf_morpho: add gradient operation typePaul B Mahol2021-09-29
|
* avfilter/vf_floodfill: constify the AVFrame parameter in is_same() and ↵James Almer2021-09-29
| | | | | | pick_pixel() functions Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_guided: Fix indentionLimin Wang2021-09-29
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_morpho: Rename functions to unbreak MSVCAndreas Rheinhardt2021-09-29
| | | | | | | | | MSVC's headers include function-like macros min and max which collide with function pointers in vf_morpho.c, leading to compilation failures. Fix this by renaming said function pointers. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: add morpho filterPaul B Mahol2021-09-28
|
* avfilter/vf_remap: remove timeline supportPaul B Mahol2021-09-28
| | | | | It is not supported, as it is possible to change frame video width and height and that can lead to undefined output.
* avfilter/vf_blend: add 14bit pixel format supportPaul B Mahol2021-09-28
|
* avfilter/vf_blend: refactor blend modesPaul B Mahol2021-09-28
|
* avfilter/vf_blend: add gray9 pixel format supportPaul B Mahol2021-09-27
|
* avfilter/vf_blend: refactor blend macrosPaul B Mahol2021-09-27
|
* avfilter/vf_blend: refactor similar codePaul B Mahol2021-09-27
|
* avfilter/preserve_color: Add necessary headersAndreas Rheinhardt2021-09-27
| | | | | | Fixes checkheaders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/audio, video: Remove references to avfilter_unref_buffer()Andreas Rheinhardt2021-09-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_blend: add softdifference blend modePaul B Mahol2021-09-26
|
* avfilter/vf_colorchannelmixer: add extended preserve color supportPaul B Mahol2021-09-26
|
* avfilter/vf_colorchannelmixer: simplify code a littlePaul B Mahol2021-09-26
|
* avfilter/vf_colorlevels: add preserve color optionPaul B Mahol2021-09-26
|
* avfilter/vf_colorlevels: refactor code so all components are processed in ↵Paul B Mahol2021-09-26
| | | | | | same loop This is also faster.
* avfilter/elbg: Extend filter to include alpha values in the quantization ↵Soft Works2021-09-26
| | | | | | | | | | | procedure Usage example: ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" -filter_complex "elbg=pal8=1:use_alpha=1" -frames:v 1 out.png Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/formats: Avoid reallocations for video in ff_all_formats()Andreas Rheinhardt2021-09-26
| | | | | | | | | | | | | Up until now, the list of pixfmts is reallocated every time an entry is added to it; there are currently 196 pixel formats, so this matters: It causes 5541704 calls to av_realloc_array() in a typical FATE run, which is the majority for said function (8095768 calls) and even a large chunk of the calls to av_realloc() itself (12589508 calls). Fix this by using ff_formats_pixdesc_filter() instead. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/formats: Make ff_formats_pixdesc_filter return AVFilterFormats*Andreas Rheinhardt2021-09-26
| | | | | | | | | | | | | | | | Up until now, it has returned the AVFilterFormats list via an AVFilterFormats** parameter; the actual return value was an int that was always AVERROR(ENOMEM) on error. The AVFilterFormats** argument was a pure output parameter which was only documented by naming the parameter rfmts. Yet nevertheless all callers initialized the underlying AVFilterFormats* to NULL. This commit changes this to return a pointer to AVFilterFormats directly. This is more in line with the API in general, as it allows to avoid checks for intermediate values. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>