1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

11239 Commits

Author SHA1 Message Date
Michael Niedermayer
fdc5b25f19
avfilter/signature_lookup: Do not dereference NULL pointers after malloc failure
Fixes: CID 1403229 Dereference after null check

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 98ae1ad7cf16bd10a4fa79f676439edc4da7cba6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 02:03:45 +02:00
Michael Niedermayer
c5dcf99399
avfilter/signature_lookup: dont leave uncleared pointers in sll_free()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6c504829514333439d15deb5717567fb4bdbbee0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 02:03:44 +02:00
Marton Balint
aa5e6017a5 avfilter/buffersrc: fix overriding unknown channel layouts with negotiated one
Fixes ffplay playback of unknown layouts, when SDL directly supports the audio
format, such as:

ffplay -f lavfi anullsrc=cl=2C,aformat=s16

Without the patch, "Channel layout change is not supported" errors are
generated because buffersrc (unknown 2 channel) and buffersink (stereo)
negotiated a stereo layout, but the stereo layout was never stored in the
BufferSourceContext.

This fixes a regression of 7251f909721a570726775acf61b2b9c28a950c76, but this
is more of a regression of the avfilter channel layout conversion
(1f96db959c1235bb7079d354e09914a0a2608f62).

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 2df2b4067ed01b9076a5dda073521551a32336cd)
2024-03-30 21:42:02 +01:00
Marton Balint
8d1e092b24 avfilter/af_channelmap: disallow channel index 64
MAX_CH is 64, therefore the maximum index is 63.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 2f754a96bd4ae4932923fe03c2d53f8273b6273c)
2024-03-30 21:30:27 +01:00
Marton Balint
0deb010ae7 avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified
In this case in_channel_idx was never set and the default 0 was used.
Suprisingly no one noticed that the respective fate test output was wrong.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 1bea3e9ee2f3521182eea6066fc8e8e1f8910c5b)
2024-03-30 21:30:21 +01:00
Marton Balint
88127b743f avfilter/af_channelmap: fix error message if FL source channel was missing
FL channel ID is 0, so for an unset value we must check for ID < 0.

Regression since 1f96db959c1235bb7079d354e09914a0a2608f62.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 9a5627ea9a213c4929020ee8c90bae74788f645c)
2024-03-30 21:30:07 +01:00
Stone Chen
fafdcb2a35 avfilter/vf_convolution: add float user_rdiv[4] to allow user options to apply correctly
Previously to support dynamic reconfigurations of the matrix string (e.g. 0m),
the rdiv values would always be cleared to 0.f, causing the rdiv to be
recalculated based on the new filter. This however had the side effect of
always ignoring user specified rdiv values.

Instead float user_rdiv[0] is added to ConvolutionContext which will store the
user specified rdiv values. Then the original rdiv array will store either the
user_rdiv or the automatically calculated 1/sum.

This fixes trac ticket #10294, #10867.

Signed-off-by: Stone Chen <chen.stonechen@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit ef917950f0298a812bebfed2443626972a7d8f29)
2024-03-19 21:25:07 +01:00
Michael Niedermayer
c9e6162554
avfilter/vf_minterpolate: Check pts before division
Fixes: FPE
Fixes: tickets/10758/poc20ffmpeg

Discovered by Zeng Yunxiang

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 68146f06f852078866b3ef1564556e3a272920c7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-30 21:59:26 +01:00
Michael Niedermayer
ea276a511a
avfilter/avf_showwaves: Check history_nb_samples
Fixes: out of array access
Fixes: tickets/10756/poc18ffmpeg

Discovered by Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 08bd2cbfeb34717d60ec62bcbaeb7996206df906)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-30 21:57:03 +01:00
Michael Niedermayer
f2d836819d
avfilter/vf_vidstabdetect: Avoid double AVERRORS
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bb04235d728a2b85d6cbe14dd60184faa932c855)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 23:09:03 +01:00
Michael Niedermayer
2450e202c4
avfilter/vf_swaprect: round coordinates down
Fixes: out of array access:
Fixes: tickets/10745/poc12ffmpeg

Found-by: Li Zeyuan and Zeng Yunxiang.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7deaca71b32c556620e05954ca2d13fbe9aacf1f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 23:05:48 +01:00
Michael Niedermayer
301100ddfb
avfilter/vf_swaprect: Use height for vertical variables
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9f4c5bd7d23eb94afe85290e03748f52483102b8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 23:05:20 +01:00
Michael Niedermayer
8e99388c1b
avfilter/vf_swaprect: assert that rectangles are within memory
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9d1ba698d2bed1d4bed731b3be62e84d72c35476)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 23:03:32 +01:00
Michael Niedermayer
e43a3d8d30
avfilter/af_alimiter: Check nextpos before use
Fixes: out of array read
Fixes: tickets/10744/poc11ffmpeg

Found-by: Li Zeyuan and Zeng Yunxiang.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a88b06f9ee8c88f78bdd614fc25283225223e858)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 22:50:30 +01:00
Michael Niedermayer
e01a55c528
avfilter/f_reverse: Apply PTS compensation only when pts is available
Fixes: out of array access
Fixes: tickets/10753/poc16ffmpeg

Regression since: 45dc668aea0edac34969b5a1ff76cf9ad3a09be1
Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 61e73851a33f0b4cb7662f8578a4695e77bd3c19)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 22:49:48 +01:00
Michael Niedermayer
0c52543781
avfilter/af_stereowiden: Check length
Fixes: out of array access
Fixes: tickets/10746/poc13ffmpeg

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 50f0f8c53c818f73fe2d752708e2fa9d2a2d8a07)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 22:49:17 +01:00
Michael Niedermayer
8b8b4bdef3
avfilter/vf_weave: Fix odd height handling
Fixes: out of array access
Fixes: tickets/10743/poc10ffmpeg

Found-by: Zeng Yunxiang and Li Zeyuan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0ecc1f0e48930723d7a467761b66850811c23e62)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 13:19:02 +01:00
Michael Niedermayer
162b4c60c8
avfilter/edge_template: Fix small inputs with gaussian_blur()
Fixes: out of array access
Fixes: Ticket10699
Fixes: poc5ffmpeg

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c443658d26d2b8e19901f9507a890e0efca79056)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 13:19:01 +01:00
Michael Niedermayer
e809c23786
avfilter/vf_gradfun: Do not overread last line
The code works in steps of 2 lines and lacks support for odd height
Implementing odd height support is better but for now this fixes the
out of array access

Fixes: out of array access
Fixes: tickets/10702/poc6ffmpe

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e4d2666bdc3dbd177a81bbf428654a5f2fa3787a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 13:19:01 +01:00
Michael Niedermayer
3061bf668f
avfilter/avf_showspectrum: fix off by 1 error
Fixes: out of array access
Fixes: tickets/10749/poc15ffmpeg

Regression since: 81df787b53eb5c6433731f6eaaf7f2a94d8a8c80

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ab0fdaedd1e7224f7e84ea22fcbfaa4ca75a6c06)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 13:19:01 +01:00
Michael Niedermayer
2929465718
avfilter/buffersink: fix order of operation with = and <0
Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c0a18e884c2d24d1052147082c358cb6929e97f1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-10 02:06:19 +01:00
Michael Niedermayer
d660dd1e0a
avfilter/framesync: fix order of operation with = and <0
Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9450a4a7fef5816ee893177c903f0232724c57c6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-10 02:06:18 +01:00
Marvin Scholz
c5ee01d966 avfilter/vf_tpad: fix check for drawing initialization
The check if drawing needs to be initialized and supported formats
should be drawable ones was flawed, as pad_stop/pad_start is only
populated from stop_duration/start_duration after these checks.

To fix that, check the _duration variants as well and for better
readability and maintainability break the check out into its own
helper.

Fixes a regression from 86b252ea9dee18006910e30646ad1067f2d1323f
Fix #10621

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 6667741029bce9a79b48caedf24d6cb69c5ead7d)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-11-09 11:30:39 +01:00
Lynne
86c4d04051 nlmeans_vulkan: fix offsets calculation and various stride issues
We calculated offsets as pairs, but addressed them in the shader
as single float values, while reading them as ivec2s.

Also removes unused code (was provisionally added if cooperative matrices
could be used, but that turned out to be impossible).

(cherry picked from commit 99fcdee5e80db8a2a8ff1ea9b66a9b74d8f96f67)
2023-11-09 09:16:55 +01:00
Lynne
4e5f3e6b8e bwdif_vulkan: fix artifacts on vulkan decode images
Due to making the decode frames context use the coded size, the
filter started to display those artifacts as it reused the input frame's size.

Change it to instead output the real image size for images, not the input.

(cherry picked from commit 0e8abf26983aa0dc72cbfbb094eeed13a9b55404)
2023-10-31 21:40:42 +01:00
Michael Niedermayer
efac4e2c44
Bump versions prior to 6.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-29 16:19:39 +01:00
Kyle Swanson
e5f774268a avfilter/libvmaf: fix broken cuda build
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-10-27 15:00:58 -07:00
Gyan Doshi
2b300eb533 avfilter/vidstab: add option for file format specification
The vidstab library added support in Nov 2020 for writing/reading
the transforms data in binary in addition to ASCII. The library default
was changed to binary format but no changes were made to the AVfilters
resulting in data file for writing or reading being always opened as text.
This effectively broke the filters.

Option added to vidstabdetect to specify file format and open files in
both filters with the correct attributes.
2023-10-26 15:46:18 +05:30
Martin Storsjö
93cda5a9c2 aarch64: Lowercase UXTW/SXTW and similar flags
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-21 23:25:23 +03:00
Martin Storsjö
184103b310 aarch64: Consistently use lowercase for vector element specifiers
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-21 23:25:18 +03:00
Niklas Haas
2d1aeba8f2 avfilter/vf_scale: fix interlaced chroma for other formats
This logic only covers the case of yuv420p. Extend this logic to cover
*all* vertically subsampled YUV formats, which require the same
interlaced scaling logic.

Fortunately, we can get away with re-using the same code for both JPEG
and MPEG range YUV, because the only difference here is the horizontal
alignment. (Which I omit touching for now, to avoid introducing possibly
unintended changes in default behavior)
2023-10-20 15:20:09 +02:00
Niklas Haas
90d327d607 avfilter/vf_showinfo: also print chroma loc
Curiously absent.
2023-10-14 00:16:57 +02:00
Kyle Swanson
2e33f5ced0 avfilter/libvmaf: update pix_fmts
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-10-12 10:37:36 -07:00
Lynne
f31d0f1141
nlmeans_vulkan: parallelize workgroup invocations 2023-10-11 16:53:06 +02:00
Lynne
658b01b5ee
nlmeans_vulkan: reduce dispatches by parallelizing the planes 2023-10-11 16:53:04 +02:00
Lynne
6bc8ff7d93
nlmeans_vulkan: fix width/height for chroma plane weights calculation 2023-10-11 16:53:00 +02:00
Kyle Swanson
6028728bb8 avfilter/libvmaf: remove deprecated options 2023-10-10 11:00:20 -07:00
Timo Rothenpieler
8b6ee74d50 avfilter/ddagrab: create secondary xor mouse texture 2023-10-09 20:17:50 +02:00
Timo Rothenpieler
0e7ae95cc2 avfilter/ddagrab: actually use provided texture pointer 2023-10-09 20:17:49 +02:00
Andreas Rheinhardt
f62c441e7a avfilter/vulkan_filter: Remove unused label
Unused since 81cc0e13455baa5e6547df40dc5961d415d6fcd2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-06 12:28:45 +02:00
Lynne
81cc0e1345
hwcontext_vulkan: properly support STORAGE usage for mutliplane images
Fixes multiplane support on Nvidia.

Also, remove the ENCODE usage, even if the driver signals it as supported.
Currently, it's not used, and when it is used, it'll be gated behind
two extension checks.
2023-10-05 23:50:30 +02:00
Anton Khirnov
63bc6430a6 lavfi/yadif: update output frame durations 2023-10-03 16:57:02 +02:00
Andreas Rheinhardt
f58038d498 avcodec/avcodec: Avoid codec_desc.h, codec_par.h inclusions
Instead, use forward declarations; and in order not to affect
any user include these headers for them, but not internally.
This has the advantage of removing implicit inclusions of these
headers from almost all files providing codecs.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-03 01:59:07 +02:00
Niklas Haas
443471356f avfilter/vf_iccdetect: use ff_icc_profile_sanitize 2023-10-03 00:28:50 +02:00
Paul B Mahol
41f5b73903 avfilter/f_ebur128: do not print summary log if nothing was processed 2023-09-29 18:40:54 +02:00
Paul B Mahol
7ce2e5f3ea avfilter/vf_pseudocolor: add support for more planar alpha formats 2023-09-28 23:09:31 +02:00
Paul B Mahol
0aa75a85e6 avfilter/vf_zscale: fix adding >8 bit alpha plane 2023-09-28 22:46:56 +02:00
Paul B Mahol
086c280901 avfilter/vf_zscale: add more planar formats with alpha 2023-09-28 22:46:55 +02:00
Paul B Mahol
35b6d9d80c avfilter/vf_negate: add support for more planar with alpha 2023-09-28 22:46:54 +02:00
Paul B Mahol
3a5171c9f4 avfilter/vf_extractplanes: add GBRAP14 support 2023-09-28 19:37:58 +02:00