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

9840 Commits

Author SHA1 Message Date
Paul B Mahol
960efa94ff avfilter/vf_v360: make reset_rot option not lose its value
Unless -1 value is provided then rotation is reset single time.
2021-10-20 14:49:13 +02:00
Paul B Mahol
407acc0747 avfilter: add varblur video filter 2021-10-19 08:53:56 +02:00
Paul B Mahol
f7ddf4fc57 avfilter/af_alimiter: add timeline and commands support 2021-10-18 22:46:36 +02:00
Paul B Mahol
374d646930 avfilter/vf_fftdnoiz: fix missing funcionality 2021-10-18 21:34:08 +02:00
Paul B Mahol
025ae145de avfilter/vf_fftdnoiz: add command options support 2021-10-18 21:34:08 +02:00
Paul B Mahol
374f2ac370 avfilter/vf_fftdnoiz: add slice threading support 2021-10-18 18:05:31 +02:00
Paul B Mahol
bbbf95848b avfilter/vf_w3fdif: do not output extra frame at start with deint=interlaced 2021-10-18 09:29:41 +02:00
Tsutomu Seki
9b445663a5 avfilter/opencl: Fix program_opencl for source code larger than 64kB
The condition (pos < len) is always true and the
rest of the OpenCL program code would not be read, while
the maximum number of "rb" is "len - pos - 1", and then, the
maximum number of the "pos" is "len - 1".

Fixes: trac.ffmpeg.org/ticket/9217
2021-10-16 12:17:23 +02:00
Paul B Mahol
5bcc61ce87 avfilter/vf_v360: add reset_rot option 2021-10-16 11:39:15 +02:00
Paul B Mahol
767f162432 avfilter/window_func: unify all filters win_func option that use this header 2021-10-15 10:45:50 +02:00
James Almer
39f3c98bb1 x86/vf_lut3d: use three operand form for some instructions
Fixes compilation with old yasm.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-10-14 18:09:38 -03:00
Paul B Mahol
890cef1ff6 avfilter/vf_fftfilt: export FFT arrays size 2021-10-14 20:26:23 +02:00
Paul B Mahol
e1b820fa33 avfilter/vf_overlay: unbreak alpha composition with negative y and threads > 1 2021-10-14 20:05:39 +02:00
Martin Storsjö
bb10f8d802 avfilter/vf_fftfilt: Use av_clip_uint8
The refactoring in 844890b1bc caused
fate-source to point out that this could be av_clip_uintp2 (or
rather av_clip_uint8).

Signed-off-by: Martin Storsjö <martin@martin.st>
2021-10-14 14:05:39 +03:00
Paul B Mahol
df05603291 avfilter/vf_histogram: add colors_mode option 2021-10-14 12:16:30 +02:00
Paul B Mahol
7d3a9bb54b avfilter/vf_fftfilt: add gray formats >8 depth support 2021-10-14 10:08:59 +02:00
Paul B Mahol
844890b1bc avfilter/vf_fftfilt: add slice threading support 2021-10-14 01:27:16 +02:00
Paul B Mahol
8add1b39e2 avfilter/vf_fftfilt: simplify bits/len calculation 2021-10-14 01:27:16 +02:00
Paul B Mahol
933765aa0e avfilter: add xcorrelate video filter 2021-10-13 19:09:21 +02:00
Paul B Mahol
32eaf4069e avfilter: add limitdiff video filter 2021-10-13 19:02:34 +02:00
Soft Works
73fe19f09c avfilter/vf_palettegen: cosmetic changes
Signed-off-by: softworkz <softworkz@hotmail.com>
2021-10-13 18:52:14 +02:00
Soft Works
dea673d0d5 avfilter/vf_palette(gen|use): support palettes with alpha 2021-10-13 18:52:14 +02:00
Mark Reid
3ee7250116 avfilter/vf_lut3d: fix building with --disable-optimizations 2021-10-13 18:01:21 +02:00
Andreas Rheinhardt
f626a3d0e0 Revert "avfilter/vf_idet: reduce noisyness if the filter has been auto inserted"
This reverts commit 723c37d3b7.
Said commit was in preparation for auto-inserting the idet filter.
This has never happened; even if it did, the code is wrong, because
it segfaults if the filter instance doesn't have a name (having one
is not mandatory). Furthermore, it is documented for libavfilter to
not assign any semantics to the name, which this check violates.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-11 15:24:00 +02:00
Paul B Mahol
90a0da9f14 avfilter/vsrc_testsrc: add planar formats for haldclutsrc 2021-10-11 10:54:05 +02:00
Mark Reid
716b396740 avfilter/vf_lut3d: add x86-optimized tetrahedral interpolation
I spotted an interesting pattern that I didn't see before that leads to the implementation being faster.
The bit shifting table I was using before is no longer needed, and was able to remove quite a few lines. 
I also add use of FMA on the AVX2 version.

f32 1920x1080 1 thread with prelut
c impl
1434012700 UNITS in lut3d->interp,       1 runs,      0 skips
1434035335 UNITS in lut3d->interp,       2 runs,      0 skips
1423615347 UNITS in lut3d->interp,       4 runs,      0 skips
1426268863 UNITS in lut3d->interp,       8 runs,      0 skips

sse2
905484420 UNITS in lut3d->interp,       1 runs,      0 skips
905659010 UNITS in lut3d->interp,       2 runs,      0 skips
915167140 UNITS in lut3d->interp,       4 runs,      0 skips
915834222 UNITS in lut3d->interp,       8 runs,      0 skips

avx
574794860 UNITS in lut3d->interp,       1 runs,      0 skips
581035090 UNITS in lut3d->interp,       2 runs,      0 skips
584116720 UNITS in lut3d->interp,       4 runs,      0 skips
581460290 UNITS in lut3d->interp,       8 runs,      0 skips

avx2
301698880 UNITS in lut3d->interp,       1 runs,      0 skips
301982880 UNITS in lut3d->interp,       2 runs,      0 skips
306962430 UNITS in lut3d->interp,       4 runs,      0 skips
305472025 UNITS in lut3d->interp,       8 runs,      0 skips

gbrap16 1920x1080 1 thread with prelut
c impl
1480894840 UNITS in lut3d->interp,       1 runs,      0 skips
1502922990 UNITS in lut3d->interp,       2 runs,      0 skips
1496114307 UNITS in lut3d->interp,       4 runs,      0 skips
1492554551 UNITS in lut3d->interp,       8 runs,      0 skips

sse2
980777180 UNITS in lut3d->interp,       1 runs,      0 skips
986121520 UNITS in lut3d->interp,       2 runs,      0 skips
986489840 UNITS in lut3d->interp,       4 runs,      0 skips
998832248 UNITS in lut3d->interp,       8 runs,      0 skips

avx
622212360 UNITS in lut3d->interp,       1 runs,      0 skips
622981160 UNITS in lut3d->interp,       2 runs,      0 skips
645396315 UNITS in lut3d->interp,       4 runs,      0 skips
641057075 UNITS in lut3d->interp,       8 runs,      0 skips

avx2
321336400 UNITS in lut3d->interp,       1 runs,      0 skips
321268920 UNITS in lut3d->interp,       2 runs,      0 skips
323459895 UNITS in lut3d->interp,       4 runs,      0 skips
324949967 UNITS in lut3d->interp,       8 runs,      0 skips
2021-10-10 22:23:48 +02:00
Andreas Rheinhardt
0c0d5faf94 avfilter/asrc_flite: Remove double ';'
(Inside a function a stray ';' is an empty statement; outside of
a function it is actually invalid, but compilers happen to accept
it without complaint (unless e.g. using -pedantic).)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 14:27:36 +02:00
Andreas Rheinhardt
aac8fa2fbf avfilter/asrc_flite: Fix races upon (un)registering voices
The voice registration system in libflite is broken: It is not
thread-safe and also not based on internal counters; instead
any call to unregister a voice frees said voice even if there are still
many other users of said voice who have also registered said voice.
While there is no way to guard against another library unregistering
voices behind our back, we can at least be correct in the absence of
other users of libflite. The current code already tried this by using
a reference count of our own for each voice; but the implementation
of this is not thread-safe at all.

Fix this by using a mutex to guard all of libavfilter's libflite
registration and unregistration calls, thereby being thread-safe
in the absence of other libflite users.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 14:27:22 +02:00
Andreas Rheinhardt
18ddb25c7a avfilter/asrc_flite: Fix use-after-frees
When an flite filter instance is uninitialized and the refcount
of the corresponding voice_entry reaches zero, the voice is
unregistered, yet the voice_entry's pointer to the voice is not reset.
(Whereas some other pointers are needlessly reset.)
Because of this a new flite filter instance will believe said voice
to already be registered, leading to use-after-frees.
Fix this by resetting the right pointer instead of the wrong ones.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 14:27:13 +02:00
Andreas Rheinhardt
304cc03798 avfilter/asrc_flite: Don't segfault when using list_voices option
Could also happen if initializing flite failed* or if an unknown voice
has been selected or if registering the voice failed.

*: which it currently can't, because it is a no-op.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 14:19:57 +02:00
Andreas Rheinhardt
9a1547ba1e avfilter/tests/filtfmts: Check for existence of formats/channel layouts
Fixes segfaults with filters that either return AVERROR(EAGAIN)
(or another error) or that do not set everything and rely on
filter_query_formats() to set the rest.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 12:04:30 +02:00
Andreas Rheinhardt
a228baeee1 avfilter/vf_scale: Reindentation
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 12:04:30 +02:00
Andreas Rheinhardt
04f8d79c24 avfilter/vf_scale: Remove always-true checks
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 12:04:30 +02:00
Andreas Rheinhardt
812a4b86a8 avfilter/vf_transpose: Don't call av_pix_fmt_desc_get() twice
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 12:04:30 +02:00
Andreas Rheinhardt
2b72e693c7 avfilter/tests/filtfmts: Replace macro by ordinary function
This is possible now that AVFilterFormatsConfig exists.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-10 12:04:29 +02:00
Paul B Mahol
57b14879b9 avfilter/vf_v360: fix scaling to give proper results 2021-10-09 16:59:35 +02:00
Paul B Mahol
fd3aba10cc avfilter/vf_v360: do not round second arg for rescale() 2021-10-09 16:59:35 +02:00
Paul B Mahol
8f26ebde14 avfilter: add audio signal to distortion ratio filter 2021-10-09 14:10:09 +02:00
Paul B Mahol
30d4609484 avfilter/af_axcorrelate: add DBLP sample format support 2021-10-09 14:10:09 +02:00
Andreas Rheinhardt
8d0082beda avfilter/af_atilt: Constify filter
(It is actually UB if a declaration and its definition differ wrt
their types like they do in this case (the declaration in allfilters
is const).)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-09 13:21:17 +02:00
Paul B Mahol
d88d0370d5 avfilter/af_axcorrelate: fix integer overflow for huge segments 2021-10-09 01:44:23 +02:00
Paul B Mahol
eb22b8953c avfilter/af_axcorrelate: always process all input samples 2021-10-09 01:44:23 +02:00
Andreas Rheinhardt
5e1dac380b avfilter/avfiltergraph: Fix use-after-free when inserting auto-converter
When inserting an auto-resampler, it may be that the configuration
of the filters that the auto-resampler is supposed to connect is
already partially merged, i.e. converter->inputs[0].incfg.foo and
converter->outputs[0].outcfg.foo (where foo is one of formats,
samplerates, channel_layouts) can coincide. Therefore merging
the converter filter's input link might modify the outcfg of the
converter' outlink. Yet the current code in avfiltergraph.c used
pointers from before merging the inlink for merging the outlink,
leading to a use-after-free in command lines like:
$ ffmpeg -f lavfi -i anullsrc=cl=stereo -lavfi channelsplit,axcorrelate -f null -
Fix this by not using outdated values when merging the outlink.

This is a regression since 85a6404d7e.

Found-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-08 12:06:00 +02:00
Wu Jianhua
314289c219 avfilter/vf_avgblur_vulkan: fix incorrect conditional judgement
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-10-08 11:09:30 +02:00
Limin Wang
254652a34c avfilter/vf_showinfo: minor adjustment for the dump format of ROI
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-08 10:11:59 +08:00
Timo Rothenpieler
1831fa7278 avfilter/sharpen_npp: use FILTER_SINGLE_PIXFMT 2021-10-07 19:01:25 +02:00
Paul B Mahol
7529781ba8 avfilter/af_axcorrelate: fix typo 2021-10-07 18:36:36 +02:00
Timo Rothenpieler
37745b4904 avfilter/scale_npp: fix non-aligned output frame dimensions 2021-10-07 18:07:53 +02:00
Roman Arzumanyan
ed084161ba avfilter/sharpen_npp: add sharpening video filter with borders control
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-10-07 18:07:53 +02:00
Andreas Rheinhardt
37cb26bf79 avfilter/vf_thumbnail_cuda: Reindent after the previous commit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-07 16:41:21 +02:00