Commit Graph

117568 Commits

Author SHA1 Message Date
Lynne
969c271a5a
x86/lpc: remove HAVE_AVX2_EXTERNAL checks 2024-10-06 01:32:49 +02:00
Lynne
892f64ad9b
x86/tx_float: remove HAVE_AVX2_EXTERNAL checks
It'll always be enabled.
Thanks, nasm.
2024-10-06 01:32:49 +02:00
Lynne
b17a240c8d
Revert "x86/tx_float: set all operands for shufps"
This reverts commit 74f5fb6db8.
2024-10-06 01:32:49 +02:00
Lynne
24c5a58e55
Revert "x86/tx_float: add missing check for AVX2"
This reverts commit f4097e4c1f.
2024-10-06 01:32:48 +02:00
Lynne
bf643f989b
Revert "x86/tx_float: add missing preprocessor wrapper for AVX2 functions"
This reverts commit 750f378bec.
2024-10-06 01:32:48 +02:00
Lynne
b890482d05
Revert "x86/tx_float: change a condition in a preprocessor check"
This reverts commit 0d8f43c74d.
2024-10-06 01:32:47 +02:00
Lynne
2f888fb99e
configure: drop yasm support
We started defauling to nasm 8 years ago.
We are still compatible with yasm 0.8.0, released in 2009. **15 years ago**.
The time has more than come to remove support for it.

Maintaining compatibility started cutting into writing new code long ago.
We still can't have 2-argument instructions, preprocessor booleans, and all
AVX2 code must still be wrapped in ifdefs. Newly added code often breaks this.
2024-10-06 01:32:47 +02:00
Lynne
73d2cb1c2b
nlmeans_vulkan: remove unused forward declaration 2024-10-06 01:32:46 +02:00
Lynne
e3d3ee516a
bwdif_vulkan: split off main shader code as a separate file
The code to support this was still there, may as well use it.
2024-10-06 01:32:46 +02:00
Lynne
6756136c92
libavfilter/Makefile: fix tag for Vulkan .comp files 2024-10-06 01:32:46 +02:00
Lynne
4a557baaa1
vulkan_encode: do not align DPB buffer size
Per subsection B stroke 165 of Chapter 56,
drivers are required to do the aligning, not users.
2024-10-06 01:21:45 +02:00
Lynne
893f3fde4c
lavc/vulkan: add SPIR-V compilation support
This is the same as with libavfilter.

We will need SPIR-V compilation for at least three different things,
like the VC-2 encoder and decoder, AV1 film grain synthesis for
hardware with no support for it, and possibly other codecs.
2024-10-06 01:21:44 +02:00
Lynne
0a1f8107bb
vulkan: move SPIR-V compilation code to libavutil
The code is not currently used by libavutil, its just where our
common Vulkan code is.
Since SPIR-V compilation will be needed by lavc, move it, rather
than having lavc including lavfi.
2024-10-06 01:21:44 +02:00
Lynne
fcd1cdcb7b
lavc/vulkan: remove redundant header 2024-10-06 01:21:43 +02:00
Lynne
4c88186d5d
lavfi/vulkan: remove redundant header 2024-10-06 01:21:41 +02:00
James Almer
57d7ba4c4f avcodec/aac/aacdec: add a missing wrapper to an AAC USAC function call
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 18:07:34 -03:00
James Almer
e907bf677a avformat/mov: split off lcevc stream group initialization to its own function
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 14:36:28 -03:00
James Almer
d5eb0e7fb3 avformat/mov: split off heif item initialization to its own function
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 14:36:28 -03:00
James Almer
cdda4c4d50 avcodec/packet: fix doxy references in AVPacketSideData
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 14:36:04 -03:00
James Almer
4a098eabf9 avcodec/hevc/ps: print a more accurate message when parsing an SPS for an unsupported layer
With multilayer001.heic:

Before:
[hevc @ ...] Scalability type 2 not supported
[hevc @ ...] Ignoring unsupported VPS extension
[hevc @ ...] The following bit-depths are currently specified: 8, 9, 10 and 12 bits, chroma_format_idc is 0, depth is 0

After:
[hevc @ ...] Scalability type 2 not supported
[hevc @ ...] Ignoring unsupported VPS extension
[hevc @ ...] SPS 1 references an unsupported VPS extension. Ignoring

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 14:36:04 -03:00
James Almer
32e34692fb avcodec/hevc/ps: print the correct unsupported scalability value found
With multilayer001.heic, which signals Spatial scalability:

Before:
[hevc @ ...] Scalability type 1 not supported
[hevc @ ...] Ignoring unsupported VPS extension

After:
[hevc @ ...] Scalability type 2 not supported
[hevc @ ...] Ignoring unsupported VPS extension

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-05 14:36:04 -03:00
Gyan Doshi
099f88b864 avcodec/libx265: unbreak build for X265_BUILD >= 213
Earlier, x265 made an API change to support alpha and
other multiple layer pictures. We added guards to accommodate
that in 1f801dfdb5

They have now reverted that API change in
https://bitbucket.org/multicoreware/x265_git/commits/78e5b703b1

Updated our wrapper guards to unbreak build again.
2024-10-05 20:18:47 +05:30
Martin Storsjö
2705c0bd81 configure: Enable -Wno-implicit-const-int-float-conversion if available
This silences a lot of compile warnings (around 160 instances at least), when
compiling with Clang.

These warnings look like this:

    libavformat/http.c:176:133: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
      176 |     { "end_offset", "try to limit the request to bytes preceding this offset", OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D },
          |     ~                                                                                                                               ^~~~~~~~~

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-04 22:57:51 +03:00
Martin Storsjö
5c4ede6b4f libavcodec: x86: Remove an explicit include of config.asm
This file is never included explicitly anywhere else, it's only
included implicitly by passing -Pconfig.asm on the command line.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-04 22:57:38 +03:00
Martin Storsjö
a27f3c590f av1dec: Don't crash if decoding of some frames have failed
If decoding with hwaccel, but decoding fails, these pointers
are null at this point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-04 22:57:03 +03:00
Nuo Mi
846fbc395b avcodec/vvc: simplify priority logical to improve performance for 4K/8K
For 4K/8K video processing, it's possible to have over 1,000 tasks pending on the executor.
In such cases, O(n) and O(log(n)) insertion times are too costly.
Reducing this to O(1) will significantly decrease the time spent in critical sections

clip                                                        | before | after  | delta
------------------------------------------------------------|--------|--------|-------
VVC_HDR_UHDTV2_OpenGOP_7680x4320_50fps_HLG10.bit            |    24  |   27   |  12.5%
VVC_HDR_UHDTV2_OpenGOP_7680x4320_50fps_HLG10_HighBitrate.bit|    12  |   17   |  41.7%
tears_of_steel_4k_8M_8bit_2000.vvc                          |    34  |  102   | 200.0%
VVC_UHDTV1_OpenGOP_3840x2160_60fps_HLG10.bit                |   126  |  128   |   1.6%
RitualDance_1920x1080_60_10_420_37_RA.266                   |   350  |  378   |   8.0%
NovosobornayaSquare_1920x1080.bin                           |   341  |  369   |   8.2%
Tango2_3840x2160_60_10_420_27_LD.266                        |    69  |   70   |   1.4%
RitualDance_1920x1080_60_10_420_32_LD.266                   |   243  |  259   |   6.6%
Chimera_8bit_1080P_1000_frames.vvc                          |   420  |  392   |  -6.7%
BQTerrace_1920x1080_60_10_420_22_RA.vvc                     |   148  |  144   |  -2.7%
2024-10-04 21:58:42 +08:00
Nuo Mi
40a14ef970 avcodec/executor: remove unused ready callback
Due to the nature of multithreading, using a "ready check" mechanism may introduce a deadlock. For example:

Suppose all tasks have been submitted to the executor, and the last thread checks the entire list and finds
no ready tasks. It then goes to sleep, waiting for a new task. However, for some multithreading-related reason,
a task becomes ready after the check. Since no other thread is aware of this and no new tasks are being added to
the executor, a deadlock occurs.

In VVC, this function is unnecessary because we use a scoreboard. All tasks submitted to the executor are ready tasks.
2024-10-04 21:58:42 +08:00
Nuo Mi
8446e27bf3 avcodec: make a local copy of executor
We still need several refactors to improve the current VVC decoder's performance,
which will frequently break the API/ABI. To mitigate this, we've copied the executor from
avutil to avcodec. Once the API/ABI is stable, we will move this class back to avutil
2024-10-04 21:58:42 +08:00
Marvin Scholz
f25c9cc213 fftools: log unconnected filter output label 2024-10-04 14:27:20 +02:00
Marvin Scholz
5beeb3a1f9 fftools: do not access out of bounds filtergraph
The log message was logged for `filtergraphs[j]` which would cause a
heap buffer overflow in certain circumstances.

Correctly it should be logged for the current filtergraph, so just
use `fg` here.
2024-10-04 14:27:20 +02:00
Lynne
ac092c6707
hwcontext_vulkan: guard all uses of new spec defines and fix stray bracket
This fixes compilation with less recent Vulkan headers.
2024-10-04 10:41:03 +02:00
Lynne
a304cbeb8d
vulkan: add profiling debug setting
This simply keeps all shader optimizations, but allows debug
data to be generated.
2024-10-04 10:10:46 +02:00
Lynne
832947be02
vulkan: don't enable GL_EXT_buffer_reference by default
Only nlmeans_vulkan uses it.
2024-10-04 10:10:45 +02:00
Lynne
2bb0b6dd2c
vulkan_shaderc: add more stages, target Vulkan 1.3 and only output debug if needed 2024-10-04 10:10:45 +02:00
Lynne
a2a983e1d0
vulkan_glslang: add more stages, target Vulkan 1.3 and output debug info 2024-10-04 10:10:45 +02:00
Lynne
0bc4e03322
lavfi/*vulkan: forward FFVulkanContext to SPIR-V compilers
We need to know what extensions are supported.
2024-10-04 10:10:44 +02:00
Lynne
356d1cc8ff
vulkan: parse instance list and add the DEBUG_UTILS extension
Required to let users know whether debugging is active.
2024-10-04 10:10:44 +02:00
Lynne
e3676d96cb
hwcontext_vulkan: move device feature struct setup to a new function 2024-10-04 10:10:43 +02:00
Lynne
535e5eb7f3
hwcontext_vulkan: enable VK_KHR_shader_relaxed_extended_instruction 2024-10-04 10:10:43 +02:00
Lynne
0d5bfd0b21
vulkan_functions: change extension type to a typedef uint64_t
We were getting a bit too close for comfort to the 32-bit limit
on enums.
2024-10-04 10:10:42 +02:00
Lynne
d80f9f55c8
vulkan: always enable GL_EXT_scalar_block_layout
This makes std430 (which we use everywhere already) fully match C
layout.
Extension was made mandatory in 1.2.
2024-10-04 10:10:42 +02:00
Lynne
37d5cb84e8
vulkan: check if current buffer has finished execution before picking another
This saves resources, as dependencies are freed/reclaimed with a lower latency,
and provies a speedup.
2024-10-04 10:10:42 +02:00
Lynne
877c5a9692
vulkan: use shader objects if supported
Shader objects finally allow completely independent shaders.
2024-10-04 10:10:41 +02:00
Lynne
d233d9902f
vulkan: move shader data execution state to execution pools
This finally permits using fully compiled shaders across
multiple execution contexts.
2024-10-04 10:10:41 +02:00
Lynne
0a37d5a3b1
vulkan: merge FFVkSPIRVShader and FFVkPipeline into FFVkShader
Pipelines are just shaders. There's no reason to treat them
differently.
This also lets us implement shader objects and is an overall
cleanup.
2024-10-04 10:10:36 +02:00
Anton Khirnov
aad4d5745d lavfi/vsrc_testsrc: switch to query_func2() 2024-10-04 10:03:34 +02:00
Anton Khirnov
28bde4a141 lavfi/vaf_spectrumsynth: switch to query_func2() 2024-10-04 10:03:34 +02:00
Anton Khirnov
3824ee2faf lavfi/vf_stack_{vaapi,qsv}: replace query_formats with a pixfmt list 2024-10-04 10:03:34 +02:00
Anton Khirnov
014a4214a9 lavfi/src_movie: switch to query_func2() 2024-10-04 10:03:34 +02:00
Anton Khirnov
55c99fb9c4 lavfi/src_avsynctest: switch to query_func2() 2024-10-04 10:03:34 +02:00