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

9634 Commits

Author SHA1 Message Date
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
Andreas Rheinhardt
443706d937 avfilter/vf_neighbor: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:32:05 +02:00
Andreas Rheinhardt
31adb960b7 avfilter/vf_maskedminmax: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:31:13 +02:00
Andreas Rheinhardt
412d645ba1 avfilter/vf_lut: Remove empty init function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:31:03 +02:00
Andreas Rheinhardt
b5be13255f avfilter/vf_lut: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:30:38 +02:00
Andreas Rheinhardt
57f6c23f29 avfilter/vf_format: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:28:03 +02:00
Andreas Rheinhardt
bb1ef872a3 avfilter/vf_blend: Don't redefine options name
Use AVFILTER_DEFINE_CLASS_EXT instead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:27:56 +02:00
Andreas Rheinhardt
39589d25e3 avfilter/src_movie: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:16 +02:00
Andreas Rheinhardt
a9f1b3db60 avfilter/split: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:07 +02:00
Andreas Rheinhardt
c8180c1310 avfilter/f_zmq: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:00 +02:00
Andreas Rheinhardt
a10a300606 avfilter/f_streamselect: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:55 +02:00
Andreas Rheinhardt
cf724beade avfilter/f_sendcmd: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:07 +02:00
Andreas Rheinhardt
fcea114b18 avfilter/f_realtime: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:00 +02:00
Andreas Rheinhardt
8435cf2307 avfilter/f_perms: Deduplicate AVClasses
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:09:06 +02:00
Andreas Rheinhardt
0eb1f45dd3 avfilter/f_graphmonitor: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:08:18 +02:00
Andreas Rheinhardt
9ceec2869a avfilter/f_drawgraph: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:08:10 +02:00
Andreas Rheinhardt
601e3da1d5 avfilter/f_cue: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:07:48 +02:00
Andreas Rheinhardt
974e8262c9 avfilter/af_sidechaincompress: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:05:55 +02:00
Andreas Rheinhardt
4ab80ac17e avfilter/af_biquads: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:04:12 +02:00
Andreas Rheinhardt
3000ac48d5 avfilter/af_asupercut: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:04:00 +02:00
Andreas Rheinhardt
8c4a7a4c09 avfilter/vf_convolution: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:01:37 +02:00
Andreas Rheinhardt
3208911055 avfilter/vf_convolution: Fix standalone build of kirsch, scharr filters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:00:05 +02:00
Andreas Rheinhardt
bc86e1b602 avfilter/af_agate: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 03:58:00 +02:00
Andreas Rheinhardt
6556146aa0 avfilter/vf_zscale: Don't make assumptions about zimg's range enums
zimg's color range enum values are off-by-one compared to ours;
therefore the code just adds one when converting from theirs to ours.
Yet this is not how one should deal with enums; use a switch instead.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-18 23:16:44 +02:00
Wu Jianhua
7bbad32d5a libavfilter/x86/vf_gblur: correct the order of loop step
The problem was caused by if the width of the processed block
minus 1 is a multiple of the aligned number the instruction
jle .bscale_scalar would skip the Optimized Loop Step, which
will lead to an incorrect sampling when specifying steps more
than 1. Move the Optimized Loop Step after .bscale_scalar to
ensure the loop step is enabled.

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-09-18 12:38:01 +02:00
Wu Jianhua
fcf10c925d libavfilter/x86/vf_gblur: fixed the fate-test failed on MacOS
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-09-18 12:37:56 +02:00
Pavel Koshevoy
4fc0b75973 avfilter/vf_zscale: fix output color_range discrepancy
This filter chain was supposed to convert from narrow range
to full range yuv444p, but didn't:

buffer=width=1280:height=720:pix_fmt=yuv444p:frame_rate=25/1:\
time_base=1/25:sar=1/1,zscale=min=709:rin=limited:pin=709:\
tin=709:t=linear,format=gbrpf32le,zscale=tin=linear:p=709:m=709:\
r=full:t=709,format=pix_fmts=yuv444p,buffersink
2021-09-17 13:35:59 -06:00
Andreas Rheinhardt
f58abfbedc avfilter/vf_coreimage: Simplify query_formats
Using ff_set_common_formats_from_list() avoids using different functions
depending upon how many inputs the filter has.

Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-17 16:29:08 +02:00
Andreas Rheinhardt
10ad3cd798 avfilter/avfilter: Actually error out on init error
Currently an error from init could be overwritten by successfully
setting the enable expression.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-17 16:17:26 +02:00
Wenbin Chen
a822e70bec libavfilter/vf_vpp_qsv: fix uninitialized variable problem
This two variables may be used below with uninitialized value.
Now fix them.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-15 09:24:08 -03:00
Timo Rothenpieler
06de593303 avfilter/frei0r: use win32dlfcn wrapper 2021-09-15 12:37:02 +02:00
Andreas Rheinhardt
441b292592 avfilter/internal: Add AVFILTER_DEFINE_CLASS_EXT
This macro will allow to share options between AVClasses without
having to redefine the option name (as is currently done) and will
also allow to share the AVClasses itself (which is possible now
that AVClass.child_class_next is gone).

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-13 16:08:29 +02:00
Andreas Rheinhardt
142f41a060 avfilter/vf_maskedminmax: Simplify init
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-13 16:08:12 +02:00
Andreas Rheinhardt
dc2279a4f2 avfilter/avfilter: Remove unused count
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-13 16:05:15 +02:00
Paul B Mahol
db2514a5dc avfilter/af_speechnorm: improve EOF timestamp precision 2021-09-12 23:47:32 +02:00
Paul B Mahol
f78d0f67be avfilter/af_dynaudnorm: improve EOF timestamp precision 2021-09-12 23:47:32 +02:00
Paul B Mahol
cd4e6e404b avfilter/vf_extractplanes: fix regression
Report & solution provided by Andreas Rheinhardt.
2021-09-12 17:06:21 +02:00
Paul B Mahol
c4973e2148 avfilter/vf_xfade: check default switch case 2021-09-12 15:06:08 +02:00
Paul B Mahol
1db828db8b avfilter/vf_xfade: add zoomin transition 2021-09-12 15:01:48 +02:00
Paul B Mahol
b35653d4c4 avfilter/vf_extractplanes: stop marking alphaextract filter as dynamic outputs 2021-09-12 13:50:01 +02:00
Paul B Mahol
882045f3dd avfilter/af_afftfilt: reindent after last commit 2021-09-12 13:28:12 +02:00
Paul B Mahol
485a52e618 avfilter/af_afftfilt: add timeline support 2021-09-12 13:28:12 +02:00
Paul B Mahol
94d4cc24c3 avfilter/af_asoftclip: rewrite oversampling
Fixes most aliasing issues.
2021-09-12 12:55:50 +02:00
Paul B Mahol
3e127b595a avfilter/vf_fieldmatch: initialize dst pointer to silence warning 2021-09-11 22:19:25 +02:00
Paul B Mahol
bf0f996c12 avfilter/f_segment: silence compiler warning 2021-09-11 22:19:25 +02:00
Paul B Mahol
0a8a0c96ae avfilter/f_loop: initialize ret to silence compiler warning 2021-09-11 22:19:25 +02:00
Paul B Mahol
d460a5f8ba avfilter/af_arnndn: initialize ret to silence compiler warning 2021-09-11 22:19:25 +02:00
Paul B Mahol
533ddd61e5 avfilter/af_afftdn: move i initialization to silence warning 2021-09-11 22:19:25 +02:00
Paul B Mahol
b53f9c5e68 avfilter/af_apsyclip: fix mixed declarations and code 2021-09-11 21:47:49 +02:00
Paul B Mahol
eeab62ad2d avfilter: add audio psychoacoustic clipper 2021-09-11 16:19:40 +02:00
Paul B Mahol
966fc3c070 avfilter/af_astats: add entropy stat 2021-09-11 10:54:20 +02:00
Paul B Mahol
463c71b3b3 avfilter/vf_convolution: add scharr operator 2021-09-10 18:43:51 +02:00
Paul B Mahol
abd24eaf68 avfilter/af_silenceremove: fix regression in output frame pts 2021-09-09 20:22:02 +02:00
Artem Galin
19a17388d8 libavfilter/vf_deinterlace_qsv: enabling d3d11va support, added mfxhdlpair
Adding DX11 relevant device type checks and adjusting callback with
proper MediaSDK pair type support.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
c1cebaa4c4 libavfilter/vf_scale_qsv: add MFX_MEMTYPE_FROM_VPPOUT flag to frame_type
In case of DX11 device type, Media SDK is sensitive to these flags.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
46c6946eee libavfilter/vf_scale_qsv: enabling d3d11va support, added mfxhdlpair
Adding DX11 relevant device type checks and adjusting callback with
proper MediaSDK pair type support.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
36166cc304 libavfilter/qsvvpp: add MFX_MEMTYPE_FROM_VPPOUT flag to output frames
In case of DX11 device type, Media SDK is sensitive to these flags.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
a611c35001 libavfilter/qsvvpp: enabling d3d11va support, added mfxhdlpair
Adding DX11 relevant device type checks and adjusting callback with
proper MediaSDK pair type support.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Paul B Mahol
3df55c7bd6 avfilter/af_speechnorm: add timeline support 2021-09-08 22:13:26 +02:00
Paul B Mahol
5db1e07a62 avfilter/af_speechnorm: check return value of av_frame_make_writable() 2021-09-08 21:44:54 +02:00
Paul B Mahol
ccd95cb248 avfilter/af_speechnorm: use floats in place of doubles where it is already float used 2021-09-08 21:44:54 +02:00
Paul B Mahol
38ab20e591 avfilter/af_silenceremove: fix stop_silence handling 2021-09-08 19:10:39 +02:00
Paul B Mahol
8a42ee6697 avfilter/af_silenceremove: avoid returning 1 sample duration frames 2021-09-08 19:10:39 +02:00
Paul B Mahol
3b331468da avfilter/af_silenceremove: fix processing of periods > 1 2021-09-08 19:10:39 +02:00
Paul B Mahol
5e7e2e5031 avfilter/af_silenceremove: guard against negative numbers 2021-09-08 10:45:53 +02:00
Paul B Mahol
c3e11e3092 avfilter/af_silenceremove: add asserts to check for NaNs 2021-09-08 10:45:53 +02:00
Paul B Mahol
4e1ee16cbb avfilter/af_silenceremove: use duration option for window option 2021-09-07 19:44:25 +02:00
Paul B Mahol
15e844ed9d avfilter/af_silenceremove: fix indentation 2021-09-07 19:44:25 +02:00
Paul B Mahol
1d1e8a47b7 avfilter/af_silenceremove: cover default case too 2021-09-07 19:44:25 +02:00
Anton Khirnov
60515a6d61 lavfi/vf_scale: pass the thread count to the scaler 2021-09-06 09:18:05 +02:00
Anton Khirnov
22c6fbc847 lavfi/vf_scale: convert to the frame-based sws API 2021-09-06 09:17:06 +02:00
James Almer
f599ae88c2 avfilter/avfiltergraph: add an "auto" constant to the threads option
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-04 10:35:01 -03:00
Andreas Rheinhardt
f58939affe avfilter/vf_xmedian: Split portion of init unique to xmedian off
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-04 15:24:59 +02:00