1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-29 05:57:37 +02:00
Commit Graph

120708 Commits

Author SHA1 Message Date
James Almer
4b39d776c3 avcodec/cbs_apv: store derived tile information in a per frame basis
If a single fragment contains more than one frame unit, the tile information stored
in the private context will only correspond to one of them.

Fixes: crash (out of array access)
Fixes: 435489659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-6194885205229568

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-12 19:59:21 +00:00
Michael Niedermayer
0469d68acb avcodec/exr: Check for pixel type consistency in DWA
Fixes: out of array access
Fixes: BIGSLEEP-436511754/testcase.exr

Found-by: Google Big Sleep
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-12 12:21:09 +02:00
Dale Curtis
069201c535 avcodec/h264_refs: Make ff_h264_build_ref_list stricter with AV_EF_EXPLODE
Don't silently skip errors when AV_EF_EXPLODE is specified.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-12 11:38:45 +02:00
Dash Santosh
6f9e8a599d checkasm/swscale: fix whitespace issues 2025-08-12 09:05:00 +00:00
Dash Santosh
ca2a88c1b3 swscale/output: Implement yuv2nv12cx neon assembly
yuv2nv12cX_2_512_accurate_c:                          3540.1 ( 1.00x)
yuv2nv12cX_2_512_accurate_neon:                        408.0 ( 8.68x)
yuv2nv12cX_2_512_approximate_c:                       3521.4 ( 1.00x)
yuv2nv12cX_2_512_approximate_neon:                     409.2 ( 8.61x)
yuv2nv12cX_4_512_accurate_c:                          4740.0 ( 1.00x)
yuv2nv12cX_4_512_accurate_neon:                        604.4 ( 7.84x)
yuv2nv12cX_4_512_approximate_c:                       4681.9 ( 1.00x)
yuv2nv12cX_4_512_approximate_neon:                     603.3 ( 7.76x)
yuv2nv12cX_8_512_accurate_c:                          7273.1 ( 1.00x)
yuv2nv12cX_8_512_accurate_neon:                       1012.2 ( 7.19x)
yuv2nv12cX_8_512_approximate_c:                       7223.0 ( 1.00x)
yuv2nv12cX_8_512_approximate_neon:                    1015.8 ( 7.11x)
yuv2nv12cX_16_512_accurate_c:                        13762.0 ( 1.00x)
yuv2nv12cX_16_512_accurate_neon:                      1761.4 ( 7.81x)
yuv2nv12cX_16_512_approximate_c:                     13884.0 ( 1.00x)
yuv2nv12cX_16_512_approximate_neon:                   1766.8 ( 7.86x)

Benchmarked on:
Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) CPU
3417 Mhz, 12 Core(s), 12 Logical Processor(s)
2025-08-12 09:05:00 +00:00
Logaprakash Ramajayam
49477972b7 swscale/aarch64/output: Implement neon assembly for yuv2planeX_10_c_template()
yuv2yuvX_8_2_0_512_accurate_c:                        2213.4 ( 1.00x)
yuv2yuvX_8_2_0_512_accurate_neon:                      147.5 (15.01x)
yuv2yuvX_8_2_0_512_approximate_c:                     2203.9 ( 1.00x)
yuv2yuvX_8_2_0_512_approximate_neon:                   154.1 (14.30x)
yuv2yuvX_8_2_16_512_accurate_c:                       2147.2 ( 1.00x)
yuv2yuvX_8_2_16_512_accurate_neon:                     150.8 (14.24x)
yuv2yuvX_8_2_16_512_approximate_c:                    2149.7 ( 1.00x)
yuv2yuvX_8_2_16_512_approximate_neon:                  146.8 (14.64x)
yuv2yuvX_8_2_32_512_accurate_c:                       2078.9 ( 1.00x)
yuv2yuvX_8_2_32_512_accurate_neon:                     139.0 (14.95x)
yuv2yuvX_8_2_32_512_approximate_c:                    2083.7 ( 1.00x)
yuv2yuvX_8_2_32_512_approximate_neon:                  140.5 (14.84x)
yuv2yuvX_8_2_48_512_accurate_c:                       2010.7 ( 1.00x)
yuv2yuvX_8_2_48_512_accurate_neon:                     138.2 (14.55x)
yuv2yuvX_8_2_48_512_approximate_c:                    2012.6 ( 1.00x)
yuv2yuvX_8_2_48_512_approximate_neon:                  141.2 (14.26x)
yuv2yuvX_10LE_16_0_512_accurate_c:                    7874.1 ( 1.00x)
yuv2yuvX_10LE_16_0_512_accurate_neon:                  831.6 ( 9.47x)
yuv2yuvX_10LE_16_0_512_approximate_c:                 7918.1 ( 1.00x)
yuv2yuvX_10LE_16_0_512_approximate_neon:               836.1 ( 9.47x)
yuv2yuvX_10LE_16_16_512_accurate_c:                   7630.9 ( 1.00x)
yuv2yuvX_10LE_16_16_512_accurate_neon:                 804.5 ( 9.49x)
yuv2yuvX_10LE_16_16_512_approximate_c:                7724.7 ( 1.00x)
yuv2yuvX_10LE_16_16_512_approximate_neon:              808.6 ( 9.55x)
yuv2yuvX_10LE_16_32_512_accurate_c:                   7436.4 ( 1.00x)
yuv2yuvX_10LE_16_32_512_accurate_neon:                 780.4 ( 9.53x)
yuv2yuvX_10LE_16_32_512_approximate_c:                7366.7 ( 1.00x)
yuv2yuvX_10LE_16_32_512_approximate_neon:              780.5 ( 9.44x)
yuv2yuvX_10LE_16_48_512_accurate_c:                   7099.9 ( 1.00x)
yuv2yuvX_10LE_16_48_512_accurate_neon:                 761.0 ( 9.33x)
yuv2yuvX_10LE_16_48_512_approximate_c:                7097.6 ( 1.00x)
yuv2yuvX_10LE_16_48_512_approximate_neon:              754.6 ( 9.41x)

Benchmarked on:
Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) CPU
3417 Mhz, 12 Core(s), 12 Logical Processor(s)
2025-08-12 09:05:00 +00:00
Niklas Haas
5929d46f7b avfilter/vf_vignette: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
ec3c9ecaa7 avfilter/vf_tonemap: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
a75f673713 avfilter/vf_selectivecolor: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
2cdf4f08b4 avfilter/vf_scdet_vulkan: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
7751f261de avfilter/vf_scdet: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
dee56511b0 avfilter/vf_scale_vulkan: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
bd59c6651b avfilter/vf_photosensitivity: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
663a37f7f9 avfilter/vf_libvmaf: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
a45113c28a avfilter/vf_libplacebo: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
ea72804295 avfilter/vf_gblur_vulkan: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
d1d64c804e avfilter/vf_freezedetect: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
d276875c90 avfilter/vf_drawtext: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
029f501a95 avfilter/vf_drawbox: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
86387038f8 avfilter/vf_delogo: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
b02d6fc556 avfilter/vf_dctdnoiz: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
d84a21a023 avfilter/vf_curves: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
8c51a8b954 avfilter/vf_blackdetect_vulkan: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
0b7827cd10 avfilter/vf_blackdetect: log with correct filter ID
If we use the private BlackDetectContext for logging, the filter ID does
not get printed alongside the filter name. Using the parent AVFilterContext
makes this consistent with other filters.
2025-08-12 09:01:39 +00:00
Niklas Haas
a47ebee7df avfilter/f_bench: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
0913576225 avfilter/avf_aphasemeter: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
96f860853e avfilter/asrc_sine: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
dcd378ad04 avfilter/asrc_sinc: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
d360c212af avfilter/asrc_hilbert: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
2e8d3548e1 avfilter/asrc_afirsrc: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
4cc71fb806 avfilter/af_silencedetect: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Niklas Haas
892c439525 avfilter/af_lv2: use AVFilterContext when logging 2025-08-12 09:01:39 +00:00
Niklas Haas
fb8f52d66c avfilter/af_afftdn: use AVFilterContext for logging 2025-08-12 09:01:39 +00:00
Ramiro Polla
5733e08c97 avcodec/mjpegdec: decode only SOF fields when finding stream info
When called from avformat_find_stream_info(), we are only interested in
decoding SOF fields.

This patch makes the decoder skip all other fields (including SOI, SOS,
and EOI). This also prevents the decoder from incorrectly printing the
warning "EOI missing, emulating" (which is the case since 2ae82788).

Fixes: #20119
2025-08-11 21:23:38 +00:00
Niklas Haas
f610b55525 avfilter/vf_libplacebo: fix possible segfault when frame mixing
pl_frame_mix_current() will return NULL if all frames are in the future,
but when libplacebo is using a frame mixer with a radius greater than 1,
future frames are expected to already be partially renderered. Instead, use
pl_frame_mix_nearest(), which is guaranteed to give us a valid frame for any
nonempty frame mix.

Fixes: 3091bca3ed
2025-08-11 21:21:55 +00:00
Martin Storsjö
13139d6d83 fate: Fix the sub-mcc tests on Windows in eastern time zones
Previously, these tests failed when running on Windows, if the
system is configured with a time zone east of Greenwich, i.e.
with a positive GMT offset.

The muxer converts the creation_date given by the user using
av_parse_time to unix time, as a time_t. The creation_date is
interpreted as a local time, i.e. according to the current time
zone. (This time_t value is then converted back to a broken out
local time form with localtime_r.)

The given reference date/time, "1970-01-01T00:00:00", is the
origin point for unix time, corresponding to time_t zero. However
when interpreted as local time, this doesn't map to exactly zero.
Time zones east of Greenwich reached this time a number of hours
before the point of zero time_t - so the corresponding time_t
value essentially is minus the GMT offset, in seconds.

Windows mktime returns an error, returning (time_t)-1, when given
such a "struct tm", while e.g. glibc mktime happily returns a
negative time_t. av_parse_time doesn't check the return value of
mktime for potential errors.

This is observable with the following test snippet:

    struct tm tm = { 0 };
    tm.tm_year = 70;
    tm.tm_isdst = -1;
    tm.tm_mday = 1;
    tm.tm_hour = 0;
    time_t t = mktime(&tm);
    printf("%d-%02d-%02d %02d:%02d:%02d\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
    printf("t %d\n", (int)t);

By varying the value of tm_hour and the system time zone, one
can observe that Windows mktime returns -1 for all time_t values
that would have been negative.

This range limit is also documented by Microsoft in detail at
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/mktime-mktime32-mktime64.

To avoid the issue, pick a different, arbitrary reference time,
which should have a nonnegative time_t for all time zones.
2025-08-11 23:14:35 +03:00
Kacper Michajłow
9b94b652db doc/examples/decode_filter_video: use av_usleep
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
5a768e8dd0 doc/examples/decode_filter_audio: remove unused unistd.h include
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
1a1377c53d avfilter/stack_internal: fix checkheaders test
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
48b941d543 tools/fourcc2pixfmt: fix getopt return value type
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
082e2b26d4 tools/graph2dot: fix getopt return value type
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
01cfb01c9c avutil/tests/pca: comment out unused code
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
eec391993e avcodec/prores_raw: add missing includes
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
a6380c35d6 avfilter/vf_blackdetect: add missing config.h include
For ARCH_X86.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
b7a3c426ea avcodec/vulkan_encode_av1: use CODEC_PIXFMTS to define pix_fmts
Fixes deprecation warnings.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
ac6db22e37 avcodec/d3d12va_encode: fix label followed by a declaration warning
Fixes: d3d12va_encode.c: warning: label followed by a declaration is a
       C23 extension

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
98c4b9dbbd swscale/input: don't generate unused functions
Fixes: input.c:1271:1: warning: unused function 'planar_rgb16_s12_to_a'
Fixes: input.c:1272:1: warning: unused function 'planar_rgb16_s10_to_a'

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
0798f58abe avcodec/mpeg4videodec: add av_unreachable for unexpected startcode
Fixes: mpeg4videodec.c:3679:22: warning: variable 'name' is used
       uninitialized whenever 'if' condition is false
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
2287a19abb avcodec/libvorbisdec: avoid overflow when assinging sample rate from long to int
Fixes: 416134551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVORBIS_DEC_fuzzer-6096101407260672
Found-by: OSS-Fuzz
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 20:31:09 +02:00
Kacper Michajłow
286a3892a8 avcodec/g728dec: init missing sample rate
Fixes: BAD BUILD: fuzzing /tmp/not-out/tmp0d_svy0e/ffmpeg_AV_CODEC_ID_G728_DEC_fuzzer with afl-fuzz failed
Found-by: OSS-Fuzz
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 20:31:09 +02:00