Commit Graph

110976 Commits

Author SHA1 Message Date
Paul B Mahol
45fa85a777 avfilter/silenceremove_template: refactor detectors using common peaks code 2023-05-29 11:47:11 +02:00
Paul B Mahol
f02964aee1 avfilter/af_silenceremove: add standard deviation detector
Useful in cases audio samples DC offset is not ~0.0, where
other detectors will fail to detect silence.
2023-05-29 11:47:10 +02:00
Paul B Mahol
aa4acc111e avfilter/af_silenceremove: use separate variable for size of cache 2023-05-29 11:47:07 +02:00
Paul B Mahol
364c03d9fe avfilter/silenceremove_template: improve ptp detector 2023-05-29 11:47:06 +02:00
Lynne
e71cd18049
vulkan_decode: do not align the image dimensions
According to Dave Airlie:

> <airlied> but I think ignoring it should be fine, I can't see any
> other way to get the imaeg extents correct for other usage
> <Lynne> what width/height should be used for the images?
> the final presentable dimensions, or the coded dimensions?
> <airlied> if you don't want noise I think the presentable dims
> <airlied> the driver should round up the allocations internally,
> but if you are going to sample from the images then w/h have to be
> the bounds of the image you want
> <airlied> since otherwise there's no way to stop the sampler from
> going outside the edges

Apparently, the alignment values are informative, rather than mandatory,
but the spec's wording makes it sound as if they're mandatory.
2023-05-29 05:12:27 +02:00
James Almer
246bec23a9 avcodec/hevc_ps: remove a unused variable
Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-28 23:24:51 -03:00
James Almer
fe103ee61f avcodec/vulkan_dec: use PRId64 specifier for an int64_t
Fixes warnings on x86-32 and Windows.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-28 23:18:53 -03:00
Lynne
bae92361ed
vulkan_decode: check if yuv_sampler exists before freeing it
This prevents multiple NULL accesses - if yuv_sampler exists, then
everything required for it to be destroyed also exists.
2023-05-29 03:23:06 +02:00
Lynne
58f82fc26a
vulkan: replace usage of %lu with %"SIZE_SPECIFIER" 2023-05-29 03:22:58 +02:00
Michael Niedermayer
988fd5743d
avcodec/kbdwin: Remove low precision intermediate in ff_kbd_window_init_fixed()
Previously floats where scaled up to 32bit int, but floats do not
have 32bits in their mantisse so a quarter of the bits where nonsense.

It seems no fate test is affected by this change, which is interresting

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00
Michael Niedermayer
17ecb224e9
avcodec/kbdwin: Avoid computing bessel values twice
Also reduce neeeded temporary storage by half

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00
Michael Niedermayer
4ea87c0f73
avcodec/kbdwin: Use av_bessel_i0()
Old code used about 7 times as many cpu cycles as new

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00
Michael Niedermayer
0c7a0514e3
avfilter/window_func: Use av_bessel_i0()
Old code needed about 6 times as long as new with defaults in afftfilt

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00
Michael Niedermayer
1e9c337e0f
avfilter/asrc_sinc: Use av_bessel_i0()
The new function is much more precise
For default beta it is slightly slower, but its speed is already at the
worst case in that comparison
while the replaced function becomes much slower for larger beta

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:55:52 +02:00
Michael Niedermayer
75918016ab
Move bessel_i0() from swresample/resample to avutil/mathematics
0th order modified bessel function of the first kind are used in multiple
places, lets avoid having 3+ different implementations
I picked this one as its accurate and quite fast, it can be replaced if
a better one is found

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:45:28 +02:00
Michael Niedermayer
0c78b0dd3b
avformat/mov: creation time should be non negative
Fixes: signed integer overflow: -9223372036854775808 - 2082844800 cannot be represented in type 'long'
Fixes: 58384/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6428383700713472

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-29 00:43:39 +02:00
Lynne
6018f87599
doc/filtering: add documentation for Vulkan filters
This commit documents most of the Vulkan filters. Some of this was
copy-pasted from equivalent OpenCL filters.
2023-05-29 00:42:04 +02:00
Lynne
ea0394fd24
changelog: add new Vulkan features 2023-05-29 00:42:03 +02:00
Lynne
f3795e1857
APIchanges: add AVHWAccel changes and bump lavc minor 2023-05-29 00:42:03 +02:00
Lynne
db1d022781
APIchanges: add hwcontext_vulkan changes and bump lavu minor 2023-05-29 00:42:02 +02:00
Lynne
bef86ba86c
APIchanges: add new pixel formats supported and bump lavu minor 2023-05-29 00:42:02 +02:00
Lynne
b3fb73af6b
swscale: bump minor for implementing support for the new pixfmts 2023-05-29 00:42:02 +02:00
Lynne
f701f088f4
vulkan_h264: reject end_frame being called without valid session parameters
When seeking through MBAFF-coded H264, this can happen. Decoding calls end_frame
without calling start_frame. We are unable to decode this, as no frame
state has been set.

Happens for both VAAPI and Vulkan. Could be an issue elsewhere, hence
the individual commit.
2023-05-29 00:42:01 +02:00
Lynne
160a415e22
lavfi: add nlmeans_vulkan filter 2023-05-29 00:42:01 +02:00
Lynne
dfff3877b7
vulkan: add support for the atomic float ops extension 2023-05-29 00:42:01 +02:00
Lynne
88e2cca3db
tools/cl2c: change to tools/source2c and allow non-OpenCL source files 2023-05-29 00:42:00 +02:00
Lynne
7cfd7e4af4
lavfi: add color_vulkan filter 2023-05-29 00:42:00 +02:00
Lynne
77478f6793
av1dec: add Vulkan hwaccel 2023-05-29 00:42:00 +02:00
Lynne
5dc047716a
fate-source: exclude Apache-2 licensed files 2023-05-29 00:41:59 +02:00
Lynne
6ec58ff820
cbs_av1: expose tile col/row starts in SBs 2023-05-29 00:41:59 +02:00
Dave Airlie
e49b8b48cd
av1: set skip mode frames properly
There are circumstances where the flag isn't set but the skip mode
frames are. So don't use the inferred bit which has other inputs
when deciding to pass the skip mode frames to the device.

This fixes some decoding bugs on intel av1
2023-05-29 00:41:58 +02:00
Lynne
36c16a06b2
hevcdec: add Vulkan hwaccel
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne
a9fbe8b472
h264dec: add Vulkan hwaccel
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne
1e8fefff93
libavcodec: add Vulkan common video decoding code 2023-05-29 00:41:57 +02:00
Lynne
023ae6103f
libavcodec: add Vulkan common video code 2023-05-29 00:41:57 +02:00
Lynne
6733a1a456
avcodec: add AVHWAccel.flush callback 2023-05-29 00:41:57 +02:00
Lynne
be07145109
avcodec: add AVHWAccel.free_frame_priv callback 2023-05-29 00:41:56 +02:00
Lynne
09dc9193ea
lavfi: add bwdif_vulkan 2023-05-29 00:41:56 +02:00
Niklas Haas
9675e54b02
avutil/hwcontext_vulkan: add libplacebo required features
For compatibility with vf_libplacebo
2023-05-29 00:41:55 +02:00
Niklas Haas
b41ea8c6c3
avfilter/vf_libplacebo: bump max vk version
For two reasons:
1. We now create a vulkan 1.3 device
2. libplacebo master currently requires a vulkan 1.3 device
2023-05-29 00:41:55 +02:00
Niklas Haas
661db605db
avfilter/vf_libplacebo: forward queue locking primitives
For thread safety.
2023-05-29 00:41:55 +02:00
Lynne
f70f873272
transpose_vulkan: port for the rewrite 2023-05-29 00:41:54 +02:00
Lynne
d4b51b5085
scale_vulkan: port for the rewrite 2023-05-29 00:41:54 +02:00
Lynne
8e9ceb1efb
overlay_vulkan: port for the rewrite 2023-05-29 00:41:54 +02:00
Lynne
59f21c051d
gblur_vulkan: port for the rewrite 2023-05-29 00:41:53 +02:00
Lynne
d26cbae3e1
flip_vulkan: port for the rewrite 2023-05-29 00:41:53 +02:00
Lynne
125636608d
chromaber_vulkan: port for the rewrite 2023-05-29 00:41:52 +02:00
Lynne
40bf1d525e
blend_vulkan: port for the rewrite 2023-05-29 00:41:52 +02:00
Lynne
f29850e98f
avgblur_vulkan: port for the rewrite 2023-05-29 00:41:52 +02:00
Lynne
05ce6473ac
lavfi: add lavfi-only Vulkan infrastructure 2023-05-29 00:41:51 +02:00