1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00
Commit Graph

120502 Commits

Author SHA1 Message Date
cb9742af76 avcodec: use the getters for xGA font data arrays
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-22 09:47:18 -03:00
c6c8063186 avutil/xga_font_data: add getters to access the shared arrays
And stop exposing the arrays on the next major bump.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-22 09:47:18 -03:00
e835738b70 avcodec/cbs_apv: add missing READ/WRITE preprocessor checks
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-22 09:47:18 -03:00
b0159af6bc avfilter/f_metadata: use the return value of vsnprintf() to write the argument list
Should fix use-of-uninitialized-value under MSAN.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-22 09:47:18 -03:00
87cc213748 avformat/hevc: don't print parameter_set_id for any NALU
It's not a value stored in the hvcC structure.
Fixes use of uninitialized variable errors under sanitizer when the input extradata is
already hvcC formatted, given we don't parse parameter sets for those.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-22 09:47:18 -03:00
48ef4caac2 avcodec/ffv1dec: don't add offsets to more NULL pointers
Fixes: libavcodec/ffv1dec.c:453:43: runtime error: applying zero offset to null pointer
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-22 09:47:17 -03:00
080dc4cf54 avformat/tls_openssl: load default verify locations
When no explicit CAs file is set, load the default locations,
else there is no way for verification to succeed.

This matches the behavior of other TLS backends.
2025-07-22 02:43:54 +02:00
f4befeb767 avformat/tls_openssl: verify setting hostname for SNI 2025-07-22 02:43:54 +02:00
e56fd2af1a avformat/tls_openssl: add hostname for verification
When verification is enabled (using -tls_verify 1) now
the hostname will be verified properly too, while before
only other aspects of the certificate were checked.

Co-Authored-By: Marvin Scholz <epirat07@gmail.com>
2025-07-22 02:43:54 +02:00
3cd4fa9b89 libtheoraenc: Add encoding speed level option
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-22 01:35:01 +02:00
157d3b007e lavu: add av_scanf_format() and use it on av_sscanf()
Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-22 01:35:01 +02:00
a01dc3aa27 avfilter/x86/vf_colordetect: add missing preprocessor checks
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-21 18:03:22 -03:00
c62813a057 avfilter/x86/vf_colordetect: make the AVX512 functions run only on ICL targets or newer
For detect_range, the usage of vpbroadcast{b,w} requires the AVX512BW extension, and for
detect_alpha we don't want ZMM instructions downclocking old CPUs.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-21 17:25:28 -03:00
b9287fde10 Changelog: add entry for vf_colorfilter addition
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-21 17:04:45 -03:00
550ec9b7e6 avfilter/version: bump version after vf_colordetect addition
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-21 17:04:45 -03:00
70fc4e5909 avfilter/x86/vf_colordetect_init: don't enable ASM functions on targets where it's known they will be slower
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-21 16:58:51 -03:00
fdca209f1f avfilter/x86/vf_colordetect: don't use rax to return a 32bit integer
Fixes compilation on x86_32 targets

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-21 16:58:36 -03:00
14f4478354 avfilter/x86/vf_colordetect: fix use of AVX512 instruction in AVX2 function on non Unix64 targets
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-21 16:52:46 -03:00
f944a70fcc tests/checkasm: add check for vf_colordetect 2025-07-21 18:10:26 +02:00
8b647b3f8a avfilter/vf_colordetect: add x86 SIMD implementation
alphadetect8_full_c:                                  5658.2 ( 1.00x)
alphadetect8_full_avx2:                                215.1 (26.31x)
alphadetect8_full_avx512:                              133.5 (42.40x)
alphadetect8_limited_c:                               7391.5 ( 1.00x)
alphadetect8_limited_avx2:                             649.3 (11.38x)
alphadetect8_limited_avx512:                           330.5 (22.36x)
alphadetect16_full_c:                                 3027.4 ( 1.00x)
alphadetect16_full_avx2:                               209.4 (14.46x)
alphadetect16_full_avx512:                             141.4 (21.41x)
alphadetect16_limited_c:                              3880.9 ( 1.00x)
alphadetect16_limited_avx2:                            734.9 ( 5.28x)
alphadetect16_limited_avx512:                          349.2 (11.11x)
rangedetect8_c:                                       5854.2 ( 1.00x)
rangedetect8_avx2:                                     138.9 (42.15x)
rangedetect8_avx512:                                   106.2 (55.12x)
rangedetect16_c:                                      4122.0 ( 1.00x)
rangedetect16_avx2:                                    138.6 (29.74x)
rangedetect16_avx512:                                  104.1 (39.60x)
2025-07-21 18:10:25 +02:00
545f721b44 avfilter/vf_colordetect: add new color range detection filter
This filter can detect various properties about the image, including
whether or not there are out-of-range values, or whether the input appears
to use straight or premultiplied alpha.

Of course, these can only be heuristics, with "undetermined" as the base
case. While we can definitely prove the existence of full range or
straight alpha colors, we can never infer the opposite.
2025-07-21 18:10:25 +02:00
8cdb47e47a avformat/concatdec: Clip duration in one more case in get_best_effort_duration()
Fixes: signed integer overflow: 40000 - -9223372036854770000 cannot be represented in type 'long'
Fixes: 427262541/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4831506940100608

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-21 01:27:23 +02:00
749aaf2744 avcodec/smacker: cleanup on bet buffer failure
Fixes: memleak (of vlc)
Fixes: 430343927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-5265858979233792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-20 01:05:24 +02:00
051e0d7744 avcodec/ffv1dec: Check k in get_vlc_symbol()
The true problem happens in several previous get_vlc_symbol()
but checking that is more expensive (involving FFABS())
here its just a simple check between 2 variables we have.

Fixes: Assertion log >= k failed at libavcodec/golomb.h:406
Fixes: 429296194/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_DEC_fuzzer-4691594622337024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-20 01:05:23 +02:00
c0f1c3e185 avcodec/ivi: Check luma/chroma mb_size
Fixes: shift exponent -1 is negative
Fixes: 429011224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5031059358285824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-20 01:05:23 +02:00
2d72bf6fe0 avcodec/cfhd: Check idwt_buf size before allocation
Fixes: OOM
Fixes: 428760799/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_DEC_fuzzer-5685176435015680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-20 01:05:23 +02:00
f7a6965308 fftools/cmdutils: Add av_freep() to avoid memory leak
Add av_freep() to free new_elem to avoid memory leak.

Fixes: 3ca1e31e63 ("fftools/cmdutils: Atomically add elements to list of pointers, fix crash")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-20 01:05:22 +02:00
85ac589211 avformat/apv: use memset to zero initialize frame_info
Don't rely on implicit zeroing.
Should fix fate failures on msvc targets.

Found-by: Kacper Michajlow <kasper93@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-19 20:01:57 -03:00
722a2170e8 avfilter/vf_curves: don't add offsets to NULL pointers
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-19 00:07:45 -03:00
11032d819d swscale/swscale_unscaled: don't add offsets to more NULL pointers
Continuation of af9b43455a.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 21:35:26 -03:00
6302ff1fd9 avfilter/vaf_spectrumsynth: don't use uninitialized variable as scale
scale was never initialized. av_tx_init() will use default scale if we
pass NULL.

Fixes: b3117f376d
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:36:25 +02:00
806186e9ad avcodec/sonic: move code closer to use to avoid unused warnings
Put decoding and encoding code into thier respective #if blocks.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:36:25 +02:00
39e11fa700 avcodec/sonic: remove dead code
This was in else branch of `#if 1` since ever. No need to keep dead code
like that, if anyone needs it they can get it from git history.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:36:25 +02:00
bf2bb119a7 configure: remove ossfuzz sanitizer flags
In OSS-Fuzz build environment flags are handled by CFLAGS and LDFLAGS.
In local build use --toolchain=clang-fuzz-asan-ubsan or similar
combination depending on requested sanitizers.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:36:25 +02:00
e1665fd71d configure: add -fuzz support to --toolchain
libFuzzer is linked only for fuzzing targets.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:36:19 +02:00
c6ce05cec3 configure: allow -ubsan in toolchain
It's is commonly called UBSAN after all.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:32:05 +02:00
1bed76cdcd configure: add -fno-omit-frame-pointer when sanitizers are used
All sanitizers give better reports with frame pointers. And skip adding
-fomit-frame-pointer.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:32:05 +02:00
85ae10575b configure: allow multiple sanitizers in --toolchain
For example this allows: --toolchain=clang-asan-usan.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-07-19 00:32:05 +02:00
36b8c200fb avformat/hevc: don't print parameter_set_id for SEI NALUs
The field is unset for those.

Fixes use of uninitialized variable errors under sanitizer.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 17:41:41 -03:00
ade02f992c tests/fate/mov: add a test for HEIF files with multiple thumbnails
As well as entries in iloc and iinf being not being stored in the same order.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 16:00:54 -03:00
85f2911891 avfilter/x86/vf_blackdetect: add missing preprocessor check
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 15:17:02 -03:00
e32264a1e1 avformat/mov: don't assume iloc and iinf entries for each item_id will be in the same order
Nothing forbids them to be in any order the muxer desires.

Fixes demuxing heif samples generated by S1II.

Tested-by: Lynne <dev@lynne.ee>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 14:57:09 -03:00
3cd5672bfe fate/lavf-container: add test for APV in MP4
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 14:55:34 -03:00
8baa691e5f avformat/mov_muxer: Extended MOV muxer to handle APV video content
- Changes in mov_write_video_tag function to handle APV elementary stream
- Provided structure APVDecoderConfigurationRecord that specifies the decoder configuration information for APV video content

Co-Authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 14:54:36 -03:00
585a8d5357 avcodec/motion_est: don't add offsets to NULL pointers
Fixes: libavcodec/motion_est.c:94:31: runtime error: applying zero offset to null pointer
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 14:23:10 -03:00
af9b43455a swscale/swscale_unscaled: don't add offsets to NULL pointers
Fixes: libswscale/swscale_unscaled.c:916:20: runtime error: applying zero offset to null pointer
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 14:23:10 -03:00
ee4ff3f706 avfilter/x86/vf_blackdetect_init: don't enable the ASM functions on targets where it's known they will be slower
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 13:05:44 -03:00
f263192f0e avfilter/x86/vf_blackdetect: don't use rax to return a 32bit integer
Fixes compilation on x86_32.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-18 13:05:44 -03:00
a218cafe4d avfilter/vf_blackdetect: Fix header guard
Fix fate-source failure.
2025-07-18 13:44:51 +02:00
bfab026298 tests/checkasm: add test for vf_blackdetect 2025-07-18 10:47:31 +02:00