Commit Graph

117390 Commits

Author SHA1 Message Date
Anton Khirnov
4011304102 lavfi/vf_fade: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
2161abaecf lavfi/vf_elbg: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
f59c1b8a0c lavfi/vf_edgedetect: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
87a619c549 lavfi/vf_drawtext: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
9ebdaa6c7d lavfi/vf_detelecine: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
f8574da8e5 lavfi/vf_deband: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
eff406f5dd lavfi/vf_datascope: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
a92052cb97 lavfi/vf_crop: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
da8cc791e2 lavfi/vf_copy: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
bc418fd872 lavfi/vf_colorspace: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
631e5bcdc7 lavfi/vf_ciescope: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
95c9c1c2be lavfi/vf_boxblur: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
7ab1ddbaf3 lavfi/vf_alphamerge: switch to query_func2()
Simplify the implementation by using the fact that ff_set_common_*()
will ignore those links on which the formats have already been set.
2024-10-07 10:46:43 +02:00
Anton Khirnov
a2881814b8 doc/ffmpeg.texi: add a diagram for the loopback decoder example 2024-10-07 10:45:10 +02:00
Anton Khirnov
794308c61b doc/ffmpeg: rewrite the detailed description chapter
Split it into sections that describe in detail
* the components of the transcoding pipeline
* the main features it handles, in order of complexity
    * streamcopy
    * transcoding
    * filtering

Replace the current confusing/misleading diagrams with new ones that
actually reflect the program components and data flow between them.
2024-10-07 10:45:07 +02:00
Lynne via ffmpeg-devel
f339169f35 configure: add spirv_compiler to avcodec_suggest
893f3fde4c made libavcodec link to libshaderc/libglslang, though
no codecs depend on it at this immediate moment.

This was merged largely as a coordination effort to synchronize three
different developers' repositories to allow them to send patches without
overlapping functionality in between.

This line can be removed once the first component to depend on spirv_compiler
lands, but leaving it in is fine too.
2024-10-06 21:11:05 +02:00
James Almer
a77365d864 configure: include liblcevc_dec ldflags in avcodec_extralibs
This is more in line with other optional libraries, instead of littering avcodec_suggest.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-06 10:42:15 -03:00
Lynne
6871fd3170
vulkan: always enable GL_EXT_control_flow_attributes 2024-10-06 07:13:04 +02:00
Lynne
8c250da8f3
vulkan: always enable GL_EXT_shader_explicit_arithmetic_types
Implicit types were a mistake.
lowp/mediump/highp was a sin.
2024-10-06 07:12:59 +02:00
Lynne
9391d4ccc5
lavu/vulkan_spirv: use correct inclusion guards
Forgot to change them after moving the file over from libavfilter.
2024-10-06 06:04:36 +02:00
IndecisiveTurtle
f456522e32
avcodec/vulkan: Add support for generating GLSL strings from comp shaders 2024-10-06 01:32:51 +02:00
IndecisiveTurtle
d80676117a
libavutil/vulkan: Prevent crash on shaders with no descriptors
Needed to prevent crashes on vc2 vulkan encoder patch
2024-10-06 01:32:50 +02:00
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