Commit Graph

110971 Commits

Author SHA1 Message Date
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
Lynne 51b7fe81be
hwcontext_vulkan: enable additional device properties 2023-05-29 00:41:51 +02:00
Lynne 33fc919bb7
hwcontext_vulkan: remove duplicate code, port to use generic vulkan utils
The temporary AVFrame on staack enables us to use the common
dependency/dispatch code in prepare_frame().
The prepare_frame() function is used for both frame initialization
and frame import/export queue family transfer operations.
In the former case, no AVFrame exists yet, so, as this is purely
libavutil code, we create a temporary frame on stack. Otherwise,
we'd need to allocate multiple frames somewhere, one for each
possible command buffer dispatch.
2023-05-29 00:41:51 +02:00
Lynne 94e17a63a4
hwcontext_vulkan: don't change properties if prepare_frame fails 2023-05-29 00:41:50 +02:00
Lynne 32fc36ee61
hwcontext_vulkan: remove linear+host_visible "fast" path
The idea was that it's faster to map linear images and copy them
via regular memcpy. This is a very niche use, plus very inconsistently
useful, as it would only really be faster on a few Intel GPUs.
Even then, using the non-cached memcpy would've been better.

Instead, scrap this code. Drivers are better at figuring out
what copy to use, and if we're host-mapping, it should actually be
just as fast, if not faster.
2023-05-29 00:41:50 +02:00
Lynne 48f85de0e7
hwcontext_vulkan: rewrite to support multiplane surfaces
This commit adds proper handling of multiplane images throughout
all of the hwcontext code. To avoid breakage of individual
components, the change is performed as a single commit.
2023-05-29 00:41:49 +02:00