Commit Graph

117465 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
1eb026dd8b riscv/vvc: fix UNDEF whilst initialising DSP
The current triggers an illegal instruction if the CPU does not support
vectors.
2024-10-12 09:23:33 +03:00
Ingo Brückl
5557c673ea avcodec/vaapi_encode: fix compilation without CONFIG_VAAPI_1
This adds VAAPIEncodeContext *ctx that has been removed
in aa82340b0c.

Signed-off-by: Ingo Brückl <ib@oddnet.de>
2024-10-12 09:10:30 +08:00
Lynne
0e19b05375
vulkan: fix layout qualifiers for 32-bit RGBA float storage reps
r8
r16/r16f
r32f

Sure, GLSL. Makes sense.
2024-10-12 00:38:49 +02:00
Lynne
8c47cf9eea
hwcontext_vulkan: enable shaderBufferInt64Atomics if supported 2024-10-11 23:54:23 +02:00
Lynne
168e8ae9bf
hwcontext_vulkan: add support for AV_PIX_FMT_RGBF32 2024-10-11 23:54:23 +02:00
Lynne
d55a351741
hwcontext_vulkan: add support for AV_PIX_FMT_RGBAF32 2024-10-11 23:54:22 +02:00
Lynne
1addd0fdca
vulkan: use correct signed image type for storage images
Using signed or unsigned integer formats/layouts requires that
"uimage" or "iimage" are used.
2024-10-11 23:54:22 +02:00
Lynne
c982376076
vulkan: extend ff_vk_shader_rep_fmt to be useful for bitexactness
The original either reported 8 or 16-bit conversion from the
original, rather than being able to return the actual original.

This makes it usable in a situation where preserving exactness
is required.
2024-10-11 23:54:18 +02:00
James Almer
bd6283342c avcodec/hevc/ps: add a range check for sps_max_sub_layers
It can't be higher than vps_max_sub_layers.

Do this while keeping the workaround for qsvenc_hevc calling ff_hevc_parse_sps()
without a vps_list, as in some cases it needs to parse an sps to generate a fake
vps derived from it.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-11 16:17:48 -03:00
James Almer
3290692d18 avcodec/hevc/ps: return a proper error code when we don't support parsing an sps
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-11 16:10:45 -03:00
James Almer
1cead90292 avutil/pixdesc: use a bigger variable type when writing bitstream formats
Fixes fate-imgutils and fate-pixelutils under gcc-usan after
29ea34728f.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-10 16:03:22 -03:00
Michael Niedermayer
7bb283aa7b
avcodec/ffv1: Implement CRC with non zero initial and final value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-10 19:34:10 +02:00
Michael Niedermayer
b7ff66a358
avcodec/ffv1enc: Prevent generation of files with broken slices
Fixes: Ticket5548

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-10 19:34:09 +02:00
Anton Khirnov
0f5592cfc7 fftools/ffmpeg: supply hw device context to probe-filtergraphs
I.e. those that are only used to figure out input/output counts, since
some filters might expect a valid hw device in init and refuse to
initalize otherwise.

This requires complex filtergraphs to be created in a separate step
after parsing global options, after all hw devices are guaranteed to
exist.
2024-10-10 09:09:29 +02:00
Anton Khirnov
84c2ca6fa0 fftools/ffmpeg_filter: do not leak graph_desc on fg_create() failure
fg_create() is passed a malloced string and assumed to always take
ownership of it.
2024-10-10 09:09:29 +02:00
Anton Khirnov
181c204145 fftools/ffmpeg_opt: add a struct to be passed as opaque to global-option handlers
Will be useful in following commits.
2024-10-10 09:09:29 +02:00
Anton Khirnov
840b95bcc2 fftools/cmdutils: do not treat single '-' as an option in locate_option()
Fixes early parsing of trailing -v/-loglevel while using '-' to output
to stdout.
2024-10-10 09:09:29 +02:00
Anton Khirnov
e56d676050 fftools/cmdutils: group related calls together
For readability only, should have no functional effect.
2024-10-10 09:09:29 +02:00
Michael Niedermayer
c4122406f6
avformat/matroskadec: Check desc_bytes so bits fit in 64bit
Likely a tighter check can be done

Fixes: signed integer overflow: 3305606804154370442 * 8 cannot be represented in type 'long'
Fixes: 70449/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4771166007918592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 21:26:47 +02:00
Michael Niedermayer
057b8c2066
avformat/mov: Avoid overflow in dts
This basically ignores the overflow without undefined behavior, alternatively we could detect and error out

Fixes: signed integer overflow: 6310596683470275584 + 7660622966157213696 cannot be represented in type 'long'
Fixes: 70433/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5483347233538048
Fixes: 369662284/clusterfuzz-testcase-minimized-media_metadata_parser_fuzzer-5327368763670528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 21:26:46 +02:00
Martin Schitter
6701534102
libavcodec/dnxuc_parser: DNxUncompressed essence parser
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 18:19:25 +02:00
Martin Schitter
3cb648d569
libavformat/mxf: Add ULs for DNxUncompressed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 18:19:25 +02:00
Martin Schitter
887726a7aa
libavcodec/: Add ID and desc for DNxUncompressed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 18:19:18 +02:00
Min Chen
37842f2caa avcodec/mfenc: add support for AV1 MF encoders
Signed-off-by: Dash Santosh <dash.sathyanarayanan@multicorewareinc.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-09 16:30:37 +03:00
Martin Storsjö
6668268e16 checkasm: lls: Use relative tolerances rather than absolute ones
Depending on the magnitude of the output values, the potential
errors can be larger.

This fixes errors in the lls tests on x86_32 for some seeds,
observed with GCC 11 (on Ubuntu 22.04, with the distro compiler,
with -m32).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-09 15:52:56 +03:00
Martin Storsjö
77e6293735 arm: Consistently use proper interworking function returns
Use "bx lr", or "pop {lr}", which do proper mode switching
between thumb and arm modes. A plain "mov pc, lr" does not switch
from thumb mode to arm mode (while in arm mode, it does switch
mode for a thumb caller).

This is normally not an issue, as CONFIG_THUMB only is enabled if
the C compiler defaults to thumb; but stick to patterns that can
do mode switching if needed, for consistency.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-09 15:52:51 +03:00
Niklas Haas
ec9985b54f swscale/internal: constify and expose ff_swscale()
Used as an intermediate entry point for the new swscale context. The extra
constification is a consistency measure, as I want to move the memcpy of
stride and plane pointers to the functions that actually need to mutate them.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:18:08 +02:00
Niklas Haas
403a20b2e6 swscale/rgb2xyz: expose these functions internally
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:17:17 +02:00
Niklas Haas
775de8c19d swscale/rgb2xyz: follow convention on image pointers and strides
Instead of taking an int16_t pointer and a stride in halfwords, follow the
usual convention of treating all planes and strides as byte-addressed.

This does not have any immediate effect but makes these functions more
reusable without unintended "gotchas".

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:14:57 +02:00
Niklas Haas
9d8f5141cf swscale/rgb2xyz: add explicit width parameter
This fixes an 11-year-old bug in the rgb2xyz functions, when used with a
negative stride. The current loop bounds turned it into a no-op.

Additionally, this increases performance on highly cropped images, whose
stride may be substantially higher than the effective width.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:14:57 +02:00
Niklas Haas
ea228fc415 swscale/rgb2xyz: minor style fixes
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:14:57 +02:00
James Almer
04612351ab swscale/input: add V30X input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:26:07 -03:00
James Almer
ea05edc9e0 swscale/input: add VYU444 input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:24:47 -03:00
James Almer
ec7f5e314d swscale/input: add UYVA input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:24:47 -03:00
James Almer
bb37d3c33e swscale/input: add AYUV input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:24:47 -03:00
Lynne
80a0567a2f
vulkan: fix ImageView flexible array struct allocation
Same as the previous commit, the compiler may insert padding.
Thanks to Marvin Scholz for pointing this out.
2024-10-09 02:39:34 +02:00
Marvin Scholz
f5e2914a89 libavutil/vulkan: fix flexible array struct allocation
The flexible array member struct can have padding added by
the compiler which was not taken into account properly, which
could lead to a heap buffer overflow.
2024-10-09 02:36:12 +02:00
jinbo
e6ecc1e757
swscale: Fix conflicting types for loongarch
Build breaks after c1a0e65763

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 01:55:50 +02:00
Martin Schitter
6a735e3388
RELEASE: update release number after release/7.1 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 01:55:50 +02:00
Lynne
4ad4f8101a
hwcontext_vulkan: set hwctx->device_features
This was forgotten during the recent device feature refactor.
2024-10-09 01:01:32 +02:00
Lynne
31def0c3ce
hwcontext_vulkan: remove redundant hostQueryReset setting
Its set just a few lines earlier.
2024-10-09 01:01:32 +02:00
Lynne
b8d1b4358b
vulkan: add a #define when printf debugging is enabled 2024-10-09 01:01:31 +02:00
Lynne
204558cee8
configure: explicitly disable spirv_compiler
spirv_compiler is an undeclared variable that was spontaneously
enabled if libshaderc or libglslang were detected, and served as
a way to enable filters.

However, it being undeclared had the effect that it was neither
considered explicitly disabled nor enabled if libshaderc or
libglslang were detected.

The only category we have which explicitly disables variables
is EXTERNAL_LIBRARY_LIST, however, spirv_compiler is not a real
external library, and making it present there would report its
detection on ./configure.
2024-10-09 00:59:33 +02:00
Lynne
57b7e96b04
configure: add spirv_compiler to avfilter_suggest as well
If someone were to enable libglslang/libshaderc, and then disable
all Vulkan filters, they would have the same issue as the earlier
fix for libavcodec.
2024-10-09 00:59:27 +02:00
James Almer
29ea34728f avutil/pixfmt: add V30X pixel format
This maps to the 444YpCbCr10 pixel format as defined by Apple.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 19:45:10 -03:00
James Almer
1f9424e0b1 avutil/pixfmt: add VYU444 pixel format
This maps to the 444YpCbCr8 pixel format as defined by Apple, which is ordered
Cr Y' Cb.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
dc3ef53819 avutil/pixfmt: add UYVA pixel format
This maps to the 4444YpCbCrA8 pixel format as defined by Apple, which is ordered
Cb Y' Cr A.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
263108a504 avutil/pixfmt: add AYUV pixel format
This maps to the 4444AYpCbCr8 pixel format as defined by Apple, which is ordered
A Y’ Cb Cr.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
2e79690a70 avutil/pixfmt: extend the VUY{A,X} description
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
Niklas Haas
477445722c swscale/ppc: fix altivec build failure
Fixes: c1a0e65763
2024-10-08 16:45:36 +02:00