1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

9606 Commits

Author SHA1 Message Date
Paul B Mahol
24e349c74b avfilter/vf_morpho: switch to internal timeline 2021-10-03 13:06:55 +02:00
Paul B Mahol
f9fc1fed29 avfilter/af_agate: switch to internal timeline 2021-10-03 13:06:54 +02:00
Paul B Mahol
8d13927340 avfilter/af_afftdn: switch to internal timeline 2021-10-03 13:06:44 +02:00
Wu Jianhua
e26c4d252f avfilter/x86/vf_blend: unify indentation format
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-10-03 09:15:55 +02:00
Paul B Mahol
db7bd99ebf avfilter/f_reverse: add missing S64(P) sample format support 2021-10-02 18:49:40 +02:00
Paul B Mahol
ba63078b0f avfilter: add (a)latency filters 2021-10-02 18:49:40 +02:00
Andreas Rheinhardt
1f387ae4cb avfilter/af_afade: Remove impossible branch
Also don't call ff_inlink_queued_samples() unnecessarily often.

Fixes Coverity issue 1427665.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-02 16:29:11 +02:00
Andreas Rheinhardt
797fefa2e5 avfilter/formats: Update outdated comment
Forgotten in 06754f7bbf.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-02 16:29:11 +02:00
Andreas Rheinhardt
e1ddaf229d avfilter/formats: Don't unnecessarily reget pixfmt descriptor
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-02 16:29:11 +02:00
Andreas Rheinhardt
3a82bb8128 avfilter/f_reverse: Don't use redundant query_formats function
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>
2021-10-02 16:21:58 +02:00
Andreas Rheinhardt
c1f7e62810 avfilter/avfilter: Remove unused buffer
Unused since the removal of ff_get_ref_perms_string() in
a05a44e205.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-02 16:20:42 +02:00
Andreas Rheinhardt
e1874cd3c4 avfilter/avfiltergraph: Remove always-true check
Always true since bc1a985ba0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-02 16:20:21 +02:00
Andreas Rheinhardt
0615a39fed avfilter/avfiltergraph: Free AVFilterGraph options properly
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-02 16:20:21 +02:00
Andreas Rheinhardt
22c4f33991 avfilter/avfiltergraph: Simplify adding filter to graph
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>
2021-10-02 16:20:21 +02:00
Limin Wang
da5497a1a2 avfilter/vf_codecview: added new options for block
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-01 07:49:00 +08:00
Paul B Mahol
a7fc78c1a6 avfilter/vf_avgblur: switch to faster algorithm 2021-09-30 01:22:57 +02:00
Paul B Mahol
a673761ce8 avfilter/vf_blend: add few more modes 2021-09-30 01:22:48 +02:00
Paul B Mahol
df163487d0 avfilter/vf_blend: add harmonic mode 2021-09-29 19:33:59 +02:00
Paul B Mahol
8ebcff9111 avfilter/vf_blend: add geometric mode 2021-09-29 19:33:59 +02:00
Paul B Mahol
f3b07b8b12 avfilter/vf_morpho: add tophat and blackhat operations 2021-09-29 18:02:26 +02:00
Paul B Mahol
b4626da92b avfilter/vf_morpho: add gradient operation type 2021-09-29 18:02:25 +02:00
James Almer
04e9b9e514 avfilter/vf_floodfill: constify the AVFrame parameter in is_same() and pick_pixel() functions
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-29 11:46:20 -03:00
Limin Wang
31831b611b avfilter/vf_guided: Fix indention
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-09-29 18:00:13 +08:00
Andreas Rheinhardt
b2538ce578 avfilter/vf_morpho: Rename functions to unbreak MSVC
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>
2021-09-29 09:17:46 +02:00
Paul B Mahol
b2ec4edef7 avfilter: add morpho filter 2021-09-28 22:57:33 +02:00
Paul B Mahol
71f2a9a2e5 avfilter/vf_remap: remove timeline support
It is not supported, as it is possible to change frame video width
and height and that can lead to undefined output.
2021-09-28 00:38:35 +02:00
Paul B Mahol
94e805235b avfilter/vf_blend: add 14bit pixel format support 2021-09-28 00:14:20 +02:00
Paul B Mahol
dd19019500 avfilter/vf_blend: refactor blend modes 2021-09-28 00:14:19 +02:00
Paul B Mahol
524407af0c avfilter/vf_blend: add gray9 pixel format support 2021-09-27 19:41:51 +02:00
Paul B Mahol
63b850c604 avfilter/vf_blend: refactor blend macros 2021-09-27 19:41:51 +02:00
Paul B Mahol
d7408a786f avfilter/vf_blend: refactor similar code 2021-09-27 19:12:48 +02:00
Andreas Rheinhardt
90546c6ca7 avfilter/preserve_color: Add necessary headers
Fixes checkheaders.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-27 10:17:53 +02:00
Andreas Rheinhardt
f7d59ca364 avfilter/audio, video: Remove references to avfilter_unref_buffer()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-27 06:10:57 +02:00
Paul B Mahol
e2d40cd1d5 avfilter/vf_blend: add softdifference blend mode 2021-09-26 23:34:47 +02:00
Paul B Mahol
53f8a03123 avfilter/vf_colorchannelmixer: add extended preserve color support 2021-09-26 20:27:24 +02:00
Paul B Mahol
e4327f97b1 avfilter/vf_colorchannelmixer: simplify code a little 2021-09-26 20:27:24 +02:00
Paul B Mahol
34102f8c07 avfilter/vf_colorlevels: add preserve color option 2021-09-26 20:27:23 +02:00
Paul B Mahol
4727e30ec3 avfilter/vf_colorlevels: refactor code so all components are processed in same loop
This is also faster.
2021-09-26 20:27:23 +02:00
Soft Works
8983c3d7e4 avfilter/elbg: Extend filter to include alpha values in the quantization 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>
2021-09-26 17:34:08 +02:00
Andreas Rheinhardt
f348a967a3 avfilter/formats: Avoid reallocations for video in ff_all_formats()
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>
2021-09-26 12:42:36 +02:00
Andreas Rheinhardt
99feb59cf7 avfilter/formats: Make ff_formats_pixdesc_filter return AVFilterFormats*
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>
2021-09-26 12:41:33 +02:00
Andreas Rheinhardt
aff855148a avfilter/vf_swaprect: Use ff_formats_pixdesc_filter()
Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-26 12:29:59 +02:00
Paul B Mahol
7b5df3b545 avfilter/vf_colorbalance: fix min/max check that can never be true
While here change doubles to floats.
2021-09-26 11:20:45 +02:00
Paul B Mahol
314ee127f3 avfilter/vf_selectivecolor: reduce number of operations with r/g/b/a pointers 2021-09-26 10:17:17 +02:00
Paul B Mahol
69f4fdd10d avfilter/vf_selectivecolor: refactor some repeating calculations 2021-09-26 10:17:17 +02:00
Paul B Mahol
d098e16f09 avfilter/vf_v360: refactor uf/vf scaling 2021-09-24 22:30:37 +02:00
Andreas Rheinhardt
6b2c1d1018 avcodec/elbg: Add flags to avpriv_elbg_do()
This is currently unused and it is only added to enable changes
while maintaining ABI compatibility. The type is uintptr_t in order
to potentially accept a pointer argument.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-24 00:01:27 +02:00
Andreas Rheinhardt
6afad4c7e9 avfilter/vf_elbg: Check call to avpriv_elbg_do()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-24 00:01:08 +02:00
Paul B Mahol
6a1bda3df9 avfilter/af_silenceremove: improve trimming middle silence 2021-09-23 23:34:45 +02:00
Andreas Rheinhardt
d6f4b91ba5 avfilter/framesync: Remove redundant setting of AVClass
Every filter exposing the framesync options via its child_next
callback already calls framesync_preinit() in its preinit callback.
So the filter is already preinited whenever its child_next is called.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-23 21:13:00 +02:00
Andreas Rheinhardt
c1b6165b73 avfilter/vf_convolve: Deduplicate framesync auxiliary functions
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-23 21:12:58 +02:00
Andreas Rheinhardt
5e9c7f1355 avfilter/vf_lut3d: Deduplicate options
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-23 21:12:58 +02:00
Andreas Rheinhardt
b368a774dd avfilter/framesync: Separate framesync AVClass and auxiliary functions
Will be useful for deduplication.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-23 21:12:37 +02:00
Andreas Rheinhardt
467c6a9146 avfilter/vf_geq: Simplify creating string
Also fixes a Wformat-truncation warning from GCC.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:35 +02:00
Andreas Rheinhardt
04a5ffa75f avfilter/vf_xfade: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:32 +02:00
Andreas Rheinhardt
c87d7c8a81 avfilter/vf_vif: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:30 +02:00
Andreas Rheinhardt
2a18ee752d avfilter/vf_threshold: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:27 +02:00
Andreas Rheinhardt
d1a92cd06f avfilter/vf_ssim: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:23 +02:00
Andreas Rheinhardt
63cc7077c1 avfilter/vf_psnr: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:20 +02:00
Andreas Rheinhardt
b6de483cb4 avfilter/vf_premultiply: Remove always-false format check
These filters use ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:17 +02:00
Andreas Rheinhardt
71285daba9 avfilter/vf_midequalizer: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:14 +02:00
Andreas Rheinhardt
0fc1abe031 avfilter/vf_maskedthreshold: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:09 +02:00
Andreas Rheinhardt
e2cd1b3c06 avfilter/vf_maskedminmax: Remove always-false format check
These filters use ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:05 +02:00
Andreas Rheinhardt
406552155a avfilter/vf_maskedmerge: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:02 +02:00
Andreas Rheinhardt
15778ccce6 avfilter/vf_maskedclamp: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:58 +02:00
Andreas Rheinhardt
095d88d7ca avfilter/vf_libvmaf: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:55 +02:00
Andreas Rheinhardt
14488c26bb avfilter/vf_identity: Remove always-false format check
These filters use ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:52 +02:00
Andreas Rheinhardt
0d3841b59b avfilter/vf_hysteresis: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:49 +02:00
Andreas Rheinhardt
bd98d125c8 avfilter/vf_guided: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:46 +02:00
Andreas Rheinhardt
caef1172ea avfilter/vf_displace: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:43 +02:00
Andreas Rheinhardt
97454352cd avfilter/vf_convolve: Remove always-false format check
These filters use ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:40 +02:00
Andreas Rheinhardt
9cffffd795 avfilter/vf_bm3d: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:37 +02:00
Andreas Rheinhardt
ef09bd65e2 avfilter/vf_blend: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:33 +02:00
Andreas Rheinhardt
910215b4db avfilter/af_sidechaincompress: Remove always-false samplerate check
This filter uses ff_set_common_all_samplerates().
Also don't overwrite outlink->sample_rate in config_output;
it is harmless, because it is overwritten with the value it already
had, but it is an API violation.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:30 +02:00
Andreas Rheinhardt
e1487deb19 avfilter/af_amerge: Remove always-false samplerate check
This filter uses ff_set_common_all_samplerates().
Also don't overwrite outlink->sample_rate in config_output;
it is harmless, because it is overwritten with the value it already
had, but it is an API violation.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:25 +02:00
Andreas Rheinhardt
789de76e21 avfilter/af_agate: Remove always-false samplerate check
This filter uses ff_set_common_all_samplerates().
Also don't overwrite outlink->sample_rate in config_output;
it is harmless, because it is overwritten with the value it already
had, but it is an API violation.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:21 +02:00
Andreas Rheinhardt
7d99507838 avfilter/af_sidechaincompress: Honour query_formats API, fix segfault
Just like the sidechaingate filter, the sidechaincompress filter
overwrote the channel layout and channel count of its output in
its config_output callback to match the channel layout of its main
input instead of linking the main input and its output together
in its query_formats callback.

This is an API violation that can lead to segfaults, as in the
following filtergraph, where stereotools rightly expects stereo,
yet receives only mono:
[in]aformat=channel_layouts=mono,aformat=channel_layouts=stereo|mono[out];\
[out][in2]sidechaincompress,stereotools

Fix this by linking the channel layouts of the main input and the output
in query_formats and remove the code overwriting it in config_output.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:17 +02:00
Andreas Rheinhardt
80d32e0f7e avfilter/af_agate: Honour query_formats API, fix segfault
The sidechaingate filter wants its main input and its (only) output
to have the same channel layout and number of channels; yet it does
not link them in its query_formats callback. Instead it sets the
outlink to only accept the first offered choice for the main input's
channel layout and then sets both inputs to independently accept
any channel counts. The config_output callback then overwrote the
outlink's channel layout and channels properties with the main input's,
even though they may differ in case the first offered choice for
the main input's channel layout turns out not to be the final one.

Consider e.g. the following filtergraph:
[in]aformat=channel_layouts=mono,aformat=channel_layouts=stereo|mono[out];\
[out][in2]sidechaingate,stereotools
The two aformats ensure that the first offered channel layout (stereo)
will not be chosen for the input; yet it is the only offered channel
layout for the output of sidechaingate and will therefore be chosen
by the query_formats framework. Because the sidechaingate outputs
interleaved doubles which stereotools expects the output of
sidechaingate appears to be suitable as input for stereotools without
further conversions. Yet stereotools actually only receives a mono frame
and therefore overreads its input buffer which leads to segfaults;
it can also lead to heap corruption because there can be writes beyond
the end of the buffer, too.

Fix this by linking the channel layouts of the main input and the output
in query_formats and remove the code overwriting it in config_output.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:56:11 +02:00
Andreas Rheinhardt
9985ea7651 avfilter/af_afade: Remove redundant checks and assignments
The acrossfade filter uses the ff_set_common_* functions in its
query_formats(), so that the formats, the sample rates as well as
the channel layouts and counts of all links coincide.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:55:47 +02:00
Paul B Mahol
59719a905c avfilter/avf_showspectrum: rewrite frequency log axis/bin scaling 2021-09-20 11:14:53 +02:00
Andreas Rheinhardt
896c11687e avcodec/elbg: Add persistent ELBGContext
It will be used in future commits to avoid having to allocate and free
all the buffers used.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 04:38:45 +02:00
Andreas Rheinhardt
8bfd466c9e avfilter/vf_elbg: Rename ELBGContext->ELBGFilterContext
The former name will be used for a context for avpriv_do_elbg().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 04:38:12 +02:00
Andreas Rheinhardt
05ccfcb7b0 avcodec/elbg: Merge avpriv_init_elbg() into avpriv_do_elbg()
These functions are always called directly after another with
the exact same arguments. This avoids exporting a symbol;
it also avoids having to perform two calls for every caller.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 04:09:22 +02:00
Andreas Rheinhardt
1ea3650823 Replace all occurences of av_mallocz_array() by av_calloc()
They do the same.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 01:03:52 +02:00
Andreas Rheinhardt
3b6c25c925 avfilter/vf_subtitles, fftools/ffmpeg: Don't set sub_text_format
Unnecessary since 1f63665ca5, because
the value the option is set to coincides with the default value.

Found-by: Soft Works <softworkz@hotmail.com>
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 00:27:47 +02:00
Paul B Mahol
0b150e4f61 avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale 2021-09-19 13:49:55 +02:00
Paul B Mahol
7747ab7ded avfilter/avf_avectorscope: add support for commands 2021-09-19 13:49:55 +02:00
Paul B Mahol
99d71c28d4 avfilter/avf_avectorscope: add slice threading for fade function 2021-09-19 13:14:11 +02:00
Paul B Mahol
4f7f046683 avfilter/avf_avectorscope: add ultra fast path when slow fading is disabled 2021-09-19 12:34:45 +02:00
Andreas Rheinhardt
d8ca8bec26 avfilter/vf_hflip: Don't call av_pix_fmt_desc_get() twice
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 05:18:51 +02:00
Andreas Rheinhardt
73a59ed1cb avfilter/vf_zscale: Use init instead of init_dict
The AVDictionary was unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:48:58 +02:00
Andreas Rheinhardt
e424d1f557 avfilter/vf_spp: Add dummy element to array to avoid shift
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:47:17 +02:00
Andreas Rheinhardt
a85d2de45f avfilter/vf_spp: Use preinit instead of init_dict
By using preinit, the AVDCT already exists directly after
allocating the filter, so that the filter's AVClass's child_next
becomes usable for setting options with the AV_OPT_SEARCH_CHILDREN
search flag. This means that it is no longer necessary to use
the init_dict callback for this filter.

Furthermore, the earlier code did not abide by the documentation
of the init_dict callback at all: Instead of only returning the
options that have not been recognized it always returned all options
on any av_opt_set() error and errored out in this case, even if it
is just an unrecognized option. This behaviour has been inherited by
avfilter_init_dict(), contradicting its documentation. This is also
fixed in this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:45:34 +02:00
Andreas Rheinhardt
0c34cf899d avfilter/af_aresample: Use preinit instead of init_dict
By using preinit, the SwrContext already exists directly after
allocating the filter, so that the filter's AVClass's child_next
becomes usable for setting options with the AV_OPT_SEARCH_CHILDREN
search flag. This means that it is no longer necessary to use
the init_dict callback for this filter.

Furthermore, the earlier code did not abide by the documentation
of the init_dict callback at all: Instead of only returning the
options that have not been recognized it always returned all options
on any av_opt_set() error and errored out in this case; yet if
the error was just caused by an unrecognized option, it should not
error out at all and instead return said option.

This behaviour has been inherited by avfilter_init_dict(),
contradicting its documentation. This is also fixed by this commit.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:44:27 +02:00
Andreas Rheinhardt
f748ca801e avfilter/vf_readeia608: Use av_dict_set_int()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:39:25 +02:00
Andreas Rheinhardt
403d8c0188 avfilter/vf_scale: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:38:02 +02:00
Andreas Rheinhardt
4906a45ada avfilter/vsrc_testsrc: Deduplicate AVClasses
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:37:22 +02:00
Andreas Rheinhardt
f8047180a8 avfilter/vf_weave: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:36:03 +02:00
Andreas Rheinhardt
57bc79e76a avfilter/vf_stack: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:34:53 +02:00
Andreas Rheinhardt
56d3e840f6 avfilter/vf_premultiply: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:32:58 +02:00