1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-20 07:48:15 +02:00

118471 Commits

Author SHA1 Message Date
Araz Iusubov
3698570442 avcodec/amfenc: Fix max rate control log message 2025-02-14 17:21:11 +01:00
James Almer
75ade2dd49 avcodec/hevc_mp4toannexb: prepend extradata before the leading PS for an IRAP
Parameter sets may be coded in the packet before an IRAP (as is the case for
the hev1 ISO-BMFF brand), and they should have priority as they may override
the extradata ones.
As such, prepend the extradata PS NALUs to the packet PS NALUs if they are
present before an IRAP, instead of prepending them to the IRAP slice.

Should fix ticket #11458.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-14 00:21:19 -03:00
Martin Storsjö
19a2d26177 random_seed: Improve behaviour with small timer increments with high precision timers
On a Zen 5, on Ubuntu 24.04 (with CLOCKS_PER_SEC 1000000), the
value of clock() in this loop increments by 0 most of the time,
and when it does increment, it usually increments by 1 compared
to the previous round.

Due to the "last_t + 2*last_td + (CLOCKS_PER_SEC > 1000) >= t"
expression, we only manage to take one step forward in this loop
(incrementing i) if clock() increments by 2, while it incremented
by 0 in the previous iteration (last_td).

This is similar to the change done in
c4152fc42e480c41efb7f761b1bbe5f0bc43d5bc, to speed it up on
systems with very small CLOCKS_PER_SEC. However in this case,
CLOCKS_PER_SEC is still very large, but the machine is fast enough
to hit every clock increment repeatedly.

For this case, use the number of repetitions of each timer value
as entropy source; require a change in the number of repetitions
in order to proceed to the next buffer index.

This helps the fate-random-seed test to actually terminate within
a reasonable time on such a system (where it previously could hang,
running for many minutes).

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-13 11:41:51 +02:00
Martin Storsjö
b053f1173d random_seed: Reorder if clauses for gathering entropy
Make it easier to add more cases.

This should be a pure refactoring, with no functional changes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-13 11:41:47 +02:00
James Almer
dc7964a862 avcodec/version: bump micro after the previous change
Useful to know if a given library build has the flush() callback or not.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-12 21:09:52 -03:00
James Almer
045a8b15b1 avcodec/ac3dec: add a flush callback for the ac3 and eac3 decoders
Fixes ticket #10732

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-12 19:12:22 -03:00
James Almer
a9e8586e3f avcodec/ac3dec: move some fields up in AC3DecodeContext
Needed for the following commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-12 19:12:13 -03:00
James Almer
22aa71d4da avcodec/libtheora: fix setting keyframe_mask
t_info.keyframe_granule_shift is set to the library default of 6, which is ok
for gop sizes up to 63. Since there's apparently no way to query the updated
value after having forced a gop value with TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE,
calculate it manually instead.

Fixes ticket #11454.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-12 18:53:25 -03:00
James Almer
eb3d507b7f avdevice/alsa: simplify passing ff_alsa_open a channel layout
This also ensures the layout set during the indev init is used instead of the
blank one in st->codecpar.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-12 18:49:07 -03:00
Rémi Bernon
d62fd6e9c8 avformat/mov: Store trak > udta metadata on each stream
Some files keep extra metadata such as 'name' fields within udta, and
it is useful for Wine to access them with the "export_all" option so
they can then be exposed to Windows applications.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-11 15:22:59 +02:00
Dennis Sädtler
78ff3782af lavc/videotoolboxenc: Add spatial_aq option
Added in macOS 15 "Sequoia".

Signed-off-by: Dennis Sädtler <dennis@obsproject.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-11 11:33:27 +02:00
Ronald S. Bultje
586de322ab threadprogress: reorder instructions to fix race.
Fixes #11456.
2025-02-10 11:00:07 -05:00
Gyan Doshi
7ee4936e0a avfilter/vpp_amf: add option reset_sar
4b77a0a681 added a new consumer of ff_scale_adjust_dimensions
which was recently modified to allow for square pixel output.

This commit extends the new option to vpp_amf, and unbreaks the building
of vf_amf_common.c
2025-02-10 19:59:26 +05:30
Timo Rothenpieler
d6a364e7c3 avfilter/vf_amf_common: fix build
AMF was forgotten in a28dc06869fe1f98c07e42f9b0a411d2744ff7d7
2025-02-10 14:32:25 +01:00
Krzysztof Pyrkosz
9fb97215df avcodec/aarch64/opusdsp_neon: Simplify opus_postfilter_neon
This change removes one extra floating point operation and simplifies
load operations at the beginning of the loop by using dedicated register
for each of the 5 pointers and interleaving it with calculations. The
first case seems to be a bit slower, but the performance increase is
substantial in the other two.

A78 before:
postfilter_15_neon:                                   1684.8 ( 4.23x)
postfilter_512_neon:                                  1395.5 ( 5.10x)
postfilter_1022_neon:                                 1357.0 ( 5.25x)

After:
postfilter_15_neon:                                   1742.2 ( 4.09x)
postfilter_512_neon:                                  1169.8 ( 6.09x)
postfilter_1022_neon:                                 1160.0 ( 6.12x)

A72 before:
postfilter_15_neon:                                   3144.8 ( 2.39x)
postfilter_512_neon:                                  3141.2 ( 2.39x)
postfilter_1022_neon:                                 3230.0 ( 2.33x)

After:
postfilter_15_neon:                                   2847.8 ( 2.64x)
postfilter_512_neon:                                  2877.8 ( 2.61x)
postfilter_1022_neon:                                 2837.2 ( 2.65x)

x13s before:
postfilter_15_neon:                                   1615.4 ( 2.61x)
postfilter_512_neon:                                   963.1 ( 4.39x)
postfilter_1022_neon:                                  963.6 ( 4.39x)

After:
postfilter_15_neon:                                   1749.6 ( 2.41x)
postfilter_512_neon:                                   707.1 ( 5.97x)
postfilter_1022_neon:                                  706.1 ( 5.99x)

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-10 14:55:16 +02:00
Martin Storsjö
e75a0f3c75 checkasm: aacencdsp: Actually test nonzero values in quant_bands
Previously, we read elements from ff_aac_pow34sf_tab; however
that table is initialized to zero; one needs to call
ff_aac_float_common_init() to make sure that the table is
initialized.

However, given the range of the input values, a large number of
entries in ff_aac_pow34sf_tab would give results outside of the
range for signed 32 bit integers. As the largest aac_cb_maxval
entry is 16, it seems more reasonable to produce values within
an order of mangitude of that value.

(When hitting INT_MIN, implementations may end up with different
results depending on whether the value is negated as a float or
as an int. This corner case is irrelevant in practice as this
is way outside of the expected value range here.)

Coincidentally, this fixes linking checkasm with Apple's older
linker. (In Xcode 15, Apple switched to a new linker. The one in
older toolchains seems to have a bug where it won't figure out to
load object files from a static library, if the only symbol
referenced in the object file is a "common" symbol, i.e. one for
a zero-initialized variable. This issue can also be reproduced with
newer Apple toolchains by passing -Wl,-ld_classic to the linker.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-10 14:03:25 +02:00
Martin Storsjö
8b3e0061e1 x86: aacencdsp: Fix negating signed values in aac_quantize_bands
Previously, we would do OR with the sign bit, forcing the output
to a negative value, while we want to negate it, by inverting the
sign bit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-10 14:03:24 +02:00
Gyan Doshi
a28dc06869 avfilter/scale*: add option reset_sar
For anamorphic videos, enabling this option leads to adjustment of
output dimensions to obtain square pixels when the user requests
proportional scaling through either of the w/h expressions or
force_original_aspect_ratio.

Output SAR is always reset to 1.

Option added to scale, scale_cuda, scale_npp & scale_vaapi.

libplacebo already has a similar option with different semantics,
scale_vt and scale_vulkan don't implement force_oar, so for these
three filters, I've made minimal changes needed to not break building
or change output.
2025-02-10 16:25:23 +05:30
Scott Theisen
e838e6cbe2 avformat/mpeg: demux ivtv captions
The packets start 'IVT0' or 'ivt0'
('I' = 0x49, 'i' = 0x69).

Signed-off-by: Marth64 <marth64@proxyid.net>
2025-02-09 20:28:11 -06:00
Scott Theisen
9fb806fa57 avcodec: add AV_CODEC_ID_IVTV_VBI
IVTV, a Linux driver for TV tuners, and V4L2 utilize
a coding named after IVTV to carry sliced VBI data
in MPEG streams produced by tuner cards with
VBI capture capability and an MPEG-2 encoder SoC.

IVTV or V4L2 driver will transport the coded data into a
MPEG-PS private stream ("IVTV") that can be captured
from the card alongside the video/audio.

The data could include:
EIA-608, Teletext, WSS (PAL widescreen signaling),
or VPS (PAL VCR signaling).

Signed-off-by: Marth64 <marth64@proxyid.net>
2025-02-09 20:27:49 -06:00
Marth64
0ae5b1bfcc avcodec/hw_base_encode: log the readable error message on failure
Currently, if there is a hardware encode failure, the numeric
error code will be printed making it somewhat hard to get to
the root cause of the issue. Print the readable message generated
by av_err2str() instead.

Signed-off-by: Marth64 <marth64@proxyid.net>
2025-02-09 20:27:49 -06:00
Leo Izen
3fca5877d0
avcodec/pngdec: avoid hard failure on illegal sBIT chunks
If a malformed chunk like sBIT appears but otherwise the stream
is still parseable, we should print a warning and skip it rather
than failing with an error.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-02-09 19:06:42 -05:00
James Almer
43be8d0728 avformat/mov: check for tts_count before deferencing tts_data
Fixes ticket #11460.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-07 23:00:34 -03:00
Peter Ross
16f9cfcf4b avcodec/leaddec: support format 0x1006
Fixes ticket #10658.
2025-02-08 10:59:05 +11:00
James Almer
a8f2374507 avformat/mov: add an offset to IAMF streams
Using audio_substream_id for AVStream ids is not ideal give that in containers
like mp4, the IAMF structure is opaque to the outside and other streams may
share such id values.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-07 19:44:13 -03:00
James Almer
268d0b6527 swscale/graph: copy scaler_params to the legacy subpass context
Fixes ticket #11448.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-07 13:17:37 -03:00
dank074
e945142df3
avformat/unix: set is_streamed to true
Currently when a Unix Domain Socket is used as input there is a loss
of data when data is consumed from the stream. Setting is_streamed to
true fixes this, since the unix domain socket is now treated like a
consumable stream.

Fixes: #9346
Signed-off-by: dank074 <torresefrain10@gmail.com>
Reviewed-by: Leo Izen <leo.izen@gmail.com>
2025-02-07 10:13:50 -05:00
Kacper Michajłow
f00a08c0ce avutil/hwcontext_amf: fix crash on uninit after init failed
amf_device_create() calls amf_device_uninit() on errors, but if things
were not initialized it will null deref amf_ctx->factory.

Fixes: https://github.com/mpv-player/mpv/issues/15814

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-02-07 13:30:01 +01:00
Krzysztof Pyrkosz
c85a748979 swscale/aarch64/rgb2rgb: Implemented NEON shuf routines
The key idea is to pass the pre-generated tables to the TBL instruction
and churn through the data 16 bytes at a time. The remaining 4 elements
are handled with a specialized block located at the end of the routine.

The 3210 variant can be implemented using rev32, but surprisingly it is
slower than the generic TBL on A78, but much faster on A72.

There may be some room for improvement. Possibly instead of handling
last 8 and then 4 bytes separately, we can load these 4 into {v0.s}[2]
and process along with the last 8 bytes.

Speeds measured with checkasm --test=sw_rgb --bench --runs=10 | grep shuf

- A78
shuffle_bytes_0321_c:                                   75.5 ( 1.00x)
shuffle_bytes_0321_neon:                                26.5 ( 2.85x)
shuffle_bytes_1203_c:                                  136.2 ( 1.00x)
shuffle_bytes_1203_neon:                                27.2 ( 5.00x)
shuffle_bytes_1230_c:                                  135.5 ( 1.00x)
shuffle_bytes_1230_neon:                                28.0 ( 4.84x)
shuffle_bytes_2013_c:                                  138.8 ( 1.00x)
shuffle_bytes_2013_neon:                                22.0 ( 6.31x)
shuffle_bytes_2103_c:                                   76.5 ( 1.00x)
shuffle_bytes_2103_neon:                                20.5 ( 3.73x)
shuffle_bytes_2130_c:                                  137.5 ( 1.00x)
shuffle_bytes_2130_neon:                                28.0 ( 4.91x)
shuffle_bytes_3012_c:                                  138.2 ( 1.00x)
shuffle_bytes_3012_neon:                                21.5 ( 6.43x)
shuffle_bytes_3102_c:                                  138.2 ( 1.00x)
shuffle_bytes_3102_neon:                                27.2 ( 5.07x)
shuffle_bytes_3210_c:                                  138.0 ( 1.00x)
shuffle_bytes_3210_neon:                                22.0 ( 6.27x)

shuf3210 using rev32
shuffle_bytes_3210_c:                                  139.0 ( 1.00x)
shuffle_bytes_3210_neon:                                28.5 ( 4.88x)

- A72
shuffle_bytes_0321_c:                                  120.0 ( 1.00x)
shuffle_bytes_0321_neon:                                36.0 ( 3.33x)
shuffle_bytes_1203_c:                                  188.2 ( 1.00x)
shuffle_bytes_1203_neon:                                37.8 ( 4.99x)
shuffle_bytes_1230_c:                                  195.0 ( 1.00x)
shuffle_bytes_1230_neon:                                36.0 ( 5.42x)
shuffle_bytes_2013_c:                                  195.8 ( 1.00x)
shuffle_bytes_2013_neon:                                43.5 ( 4.50x)
shuffle_bytes_2103_c:                                  117.2 ( 1.00x)
shuffle_bytes_2103_neon:                                53.5 ( 2.19x)
shuffle_bytes_2130_c:                                  203.2 ( 1.00x)
shuffle_bytes_2130_neon:                                37.8 ( 5.38x)
shuffle_bytes_3012_c:                                  183.8 ( 1.00x)
shuffle_bytes_3012_neon:                                46.8 ( 3.93x)
shuffle_bytes_3102_c:                                  180.8 ( 1.00x)
shuffle_bytes_3102_neon:                                37.8 ( 4.79x)
shuffle_bytes_3210_c:                                  195.8 ( 1.00x)
shuffle_bytes_3210_neon:                                37.8 ( 5.19x)

shuf3210 using rev32
shuffle_bytes_3210_c:                                  194.8 ( 1.00x)
shuffle_bytes_3210_neon:                                30.8 ( 6.33x)

- x13s:
shuffle_bytes_0321_c:                                   49.4 ( 1.00x)
shuffle_bytes_0321_neon:                                18.1 ( 2.72x)
shuffle_bytes_1203_c:                                   98.4 ( 1.00x)
shuffle_bytes_1203_neon:                                18.4 ( 5.35x)
shuffle_bytes_1230_c:                                   97.4 ( 1.00x)
shuffle_bytes_1230_neon:                                19.1 ( 5.09x)
shuffle_bytes_2013_c:                                  101.4 ( 1.00x)
shuffle_bytes_2013_neon:                                16.9 ( 6.01x)
shuffle_bytes_2103_c:                                   53.9 ( 1.00x)
shuffle_bytes_2103_neon:                                13.9 ( 3.88x)
shuffle_bytes_2130_c:                                  100.9 ( 1.00x)
shuffle_bytes_2130_neon:                                19.1 ( 5.27x)
shuffle_bytes_3012_c:                                   97.4 ( 1.00x)
shuffle_bytes_3012_neon:                                17.1 ( 5.69x)
shuffle_bytes_3102_c:                                  100.9 ( 1.00x)
shuffle_bytes_3102_neon:                                19.1 ( 5.27x)
shuffle_bytes_3210_c:                                  100.6 ( 1.00x)
shuffle_bytes_3210_neon:                                16.9 ( 5.96x)

shuf3210 using rev32
shuffle_bytes_3210_c:                                  100.6 ( 1.00x)
shuffle_bytes_3210_neon:                                18.6 ( 5.40x)

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-07 12:54:55 +02:00
Krzysztof Pyrkosz
e25a19fc7c swscale/aarch64/output.S: refactor ff_yuv2plane1_8_neon
The benchmarks (before vs after) were gathered using
./tests/checkasm/checkasm --test=sw_scale --bench --runs=6 | grep yuv2yuv1

A78 before:
yuv2yuv1_0_512_accurate_c:                            2039.5 ( 1.00x)
yuv2yuv1_0_512_accurate_neon:                          385.5 ( 5.29x)
yuv2yuv1_0_512_approximate_c:                         2110.5 ( 1.00x)
yuv2yuv1_0_512_approximate_neon:                       385.5 ( 5.47x)
yuv2yuv1_3_512_accurate_c:                            2061.2 ( 1.00x)
yuv2yuv1_3_512_accurate_neon:                          381.2 ( 5.41x)
yuv2yuv1_3_512_approximate_c:                         2099.2 ( 1.00x)
yuv2yuv1_3_512_approximate_neon:                       381.2 ( 5.51x)
yuv2yuv1_8_512_accurate_c:                            2054.2 ( 1.00x)
yuv2yuv1_8_512_accurate_neon:                          385.5 ( 5.33x)
yuv2yuv1_8_512_approximate_c:                         2112.2 ( 1.00x)
yuv2yuv1_8_512_approximate_neon:                       385.5 ( 5.48x)
yuv2yuv1_11_512_accurate_c:                           2036.0 ( 1.00x)
yuv2yuv1_11_512_accurate_neon:                         381.2 ( 5.34x)
yuv2yuv1_11_512_approximate_c:                        2115.0 ( 1.00x)
yuv2yuv1_11_512_approximate_neon:                      381.2 ( 5.55x)
yuv2yuv1_16_512_accurate_c:                           2066.5 ( 1.00x)
yuv2yuv1_16_512_accurate_neon:                         385.5 ( 5.36x)
yuv2yuv1_16_512_approximate_c:                        2100.8 ( 1.00x)
yuv2yuv1_16_512_approximate_neon:                      385.5 ( 5.45x)
yuv2yuv1_19_512_accurate_c:                           2059.8 ( 1.00x)
yuv2yuv1_19_512_accurate_neon:                         381.2 ( 5.40x)
yuv2yuv1_19_512_approximate_c:                        2102.8 ( 1.00x)
yuv2yuv1_19_512_approximate_neon:                      381.2 ( 5.52x)

After:
yuv2yuv1_0_512_accurate_c:                            2206.0 ( 1.00x)
yuv2yuv1_0_512_accurate_neon:                          139.2 (15.84x)
yuv2yuv1_0_512_approximate_c:                         2050.0 ( 1.00x)
yuv2yuv1_0_512_approximate_neon:                       139.2 (14.72x)
yuv2yuv1_3_512_accurate_c:                            2205.2 ( 1.00x)
yuv2yuv1_3_512_accurate_neon:                          138.0 (15.98x)
yuv2yuv1_3_512_approximate_c:                         2052.5 ( 1.00x)
yuv2yuv1_3_512_approximate_neon:                       138.0 (14.87x)
yuv2yuv1_8_512_accurate_c:                            2171.0 ( 1.00x)
yuv2yuv1_8_512_accurate_neon:                          139.2 (15.59x)
yuv2yuv1_8_512_approximate_c:                         2064.2 ( 1.00x)
yuv2yuv1_8_512_approximate_neon:                       139.2 (14.82x)
yuv2yuv1_11_512_accurate_c:                           2164.8 ( 1.00x)
yuv2yuv1_11_512_accurate_neon:                         138.0 (15.69x)
yuv2yuv1_11_512_approximate_c:                        2048.8 ( 1.00x)
yuv2yuv1_11_512_approximate_neon:                      138.0 (14.85x)
yuv2yuv1_16_512_accurate_c:                           2154.5 ( 1.00x)
yuv2yuv1_16_512_accurate_neon:                         139.2 (15.47x)
yuv2yuv1_16_512_approximate_c:                        2047.2 ( 1.00x)
yuv2yuv1_16_512_approximate_neon:                      139.2 (14.70x)
yuv2yuv1_19_512_accurate_c:                           2144.5 ( 1.00x)
yuv2yuv1_19_512_accurate_neon:                         138.0 (15.54x)
yuv2yuv1_19_512_approximate_c:                        2046.0 ( 1.00x)
yuv2yuv1_19_512_approximate_neon:                      138.0 (14.83x)

A72 before:
yuv2yuv1_0_512_accurate_c:                            3779.8 ( 1.00x)
yuv2yuv1_0_512_accurate_neon:                          527.8 ( 7.16x)
yuv2yuv1_0_512_approximate_c:                         4128.2 ( 1.00x)
yuv2yuv1_0_512_approximate_neon:                       528.2 ( 7.81x)
yuv2yuv1_3_512_accurate_c:                            3836.2 ( 1.00x)
yuv2yuv1_3_512_accurate_neon:                          527.0 ( 7.28x)
yuv2yuv1_3_512_approximate_c:                         3991.0 ( 1.00x)
yuv2yuv1_3_512_approximate_neon:                       526.8 ( 7.58x)
yuv2yuv1_8_512_accurate_c:                            3732.8 ( 1.00x)
yuv2yuv1_8_512_accurate_neon:                          525.5 ( 7.10x)
yuv2yuv1_8_512_approximate_c:                         4060.0 ( 1.00x)
yuv2yuv1_8_512_approximate_neon:                       527.0 ( 7.70x)
yuv2yuv1_11_512_accurate_c:                           3836.2 ( 1.00x)
yuv2yuv1_11_512_accurate_neon:                         530.0 ( 7.24x)
yuv2yuv1_11_512_approximate_c:                        4014.0 ( 1.00x)
yuv2yuv1_11_512_approximate_neon:                      530.0 ( 7.57x)
yuv2yuv1_16_512_accurate_c:                           3726.2 ( 1.00x)
yuv2yuv1_16_512_accurate_neon:                         525.5 ( 7.09x)
yuv2yuv1_16_512_approximate_c:                        4114.2 ( 1.00x)
yuv2yuv1_16_512_approximate_neon:                      526.2 ( 7.82x)
yuv2yuv1_19_512_accurate_c:                           3812.2 ( 1.00x)
yuv2yuv1_19_512_accurate_neon:                         530.0 ( 7.19x)
yuv2yuv1_19_512_approximate_c:                        4012.2 ( 1.00x)
yuv2yuv1_19_512_approximate_neon:                      530.0 ( 7.57x)

After:
yuv2yuv1_0_512_accurate_c:                            3716.8 ( 1.00x)
yuv2yuv1_0_512_accurate_neon:                          215.1 (17.28x)
yuv2yuv1_0_512_approximate_c:                         3877.8 ( 1.00x)
yuv2yuv1_0_512_approximate_neon:                       222.8 (17.40x)
yuv2yuv1_3_512_accurate_c:                            3717.1 ( 1.00x)
yuv2yuv1_3_512_accurate_neon:                          217.8 (17.06x)
yuv2yuv1_3_512_approximate_c:                         3801.6 ( 1.00x)
yuv2yuv1_3_512_approximate_neon:                       220.3 (17.25x)
yuv2yuv1_8_512_accurate_c:                            3716.6 ( 1.00x)
yuv2yuv1_8_512_accurate_neon:                          213.8 (17.38x)
yuv2yuv1_8_512_approximate_c:                         3831.8 ( 1.00x)
yuv2yuv1_8_512_approximate_neon:                       218.1 (17.57x)
yuv2yuv1_11_512_accurate_c:                           3717.1 ( 1.00x)
yuv2yuv1_11_512_accurate_neon:                         219.1 (16.97x)
yuv2yuv1_11_512_approximate_c:                        3801.6 ( 1.00x)
yuv2yuv1_11_512_approximate_neon:                      216.1 (17.59x)
yuv2yuv1_16_512_accurate_c:                           3716.6 ( 1.00x)
yuv2yuv1_16_512_accurate_neon:                         213.6 (17.40x)
yuv2yuv1_16_512_approximate_c:                        3831.6 ( 1.00x)
yuv2yuv1_16_512_approximate_neon:                      215.1 (17.82x)
yuv2yuv1_19_512_accurate_c:                           3717.1 ( 1.00x)
yuv2yuv1_19_512_accurate_neon:                         223.8 (16.61x)
yuv2yuv1_19_512_approximate_c:                        3801.6 ( 1.00x)
yuv2yuv1_19_512_approximate_neon:                      219.1 (17.35x)

x13s before:
yuv2yuv1_0_512_accurate_c:                            1435.1 ( 1.00x)
yuv2yuv1_0_512_accurate_neon:                          221.1 ( 6.49x)
yuv2yuv1_0_512_approximate_c:                         1405.4 ( 1.00x)
yuv2yuv1_0_512_approximate_neon:                       219.1 ( 6.41x)
yuv2yuv1_3_512_accurate_c:                            1418.6 ( 1.00x)
yuv2yuv1_3_512_accurate_neon:                          215.9 ( 6.57x)
yuv2yuv1_3_512_approximate_c:                         1405.9 ( 1.00x)
yuv2yuv1_3_512_approximate_neon:                       224.1 ( 6.27x)
yuv2yuv1_8_512_accurate_c:                            1433.9 ( 1.00x)
yuv2yuv1_8_512_accurate_neon:                          218.6 ( 6.56x)
yuv2yuv1_8_512_approximate_c:                         1412.9 ( 1.00x)
yuv2yuv1_8_512_approximate_neon:                       218.9 ( 6.46x)
yuv2yuv1_11_512_accurate_c:                           1449.1 ( 1.00x)
yuv2yuv1_11_512_accurate_neon:                         217.6 ( 6.66x)
yuv2yuv1_11_512_approximate_c:                        1410.9 ( 1.00x)
yuv2yuv1_11_512_approximate_neon:                      221.1 ( 6.38x)
yuv2yuv1_16_512_accurate_c:                           1402.1 ( 1.00x)
yuv2yuv1_16_512_accurate_neon:                         214.6 ( 6.53x)
yuv2yuv1_16_512_approximate_c:                        1422.4 ( 1.00x)
yuv2yuv1_16_512_approximate_neon:                      222.9 ( 6.38x)
yuv2yuv1_19_512_accurate_c:                           1421.6 ( 1.00x)
yuv2yuv1_19_512_accurate_neon:                         217.4 ( 6.54x)
yuv2yuv1_19_512_approximate_c:                        1421.6 ( 1.00x)
yuv2yuv1_19_512_approximate_neon:                      221.4 ( 6.42x)

After:
yuv2yuv1_0_512_accurate_c:                            1413.6 ( 1.00x)
yuv2yuv1_0_512_accurate_neon:                           80.6 (17.53x)
yuv2yuv1_0_512_approximate_c:                         1455.6 ( 1.00x)
yuv2yuv1_0_512_approximate_neon:                        80.6 (18.05x)
yuv2yuv1_3_512_accurate_c:                            1429.1 ( 1.00x)
yuv2yuv1_3_512_accurate_neon:                           77.4 (18.47x)
yuv2yuv1_3_512_approximate_c:                         1462.6 ( 1.00x)
yuv2yuv1_3_512_approximate_neon:                        80.6 (18.14x)
yuv2yuv1_8_512_accurate_c:                            1425.4 ( 1.00x)
yuv2yuv1_8_512_accurate_neon:                           77.9 (18.30x)
yuv2yuv1_8_512_approximate_c:                         1436.6 ( 1.00x)
yuv2yuv1_8_512_approximate_neon:                        80.9 (17.76x)
yuv2yuv1_11_512_accurate_c:                           1429.4 ( 1.00x)
yuv2yuv1_11_512_accurate_neon:                          76.1 (18.78x)
yuv2yuv1_11_512_approximate_c:                        1447.1 ( 1.00x)
yuv2yuv1_11_512_approximate_neon:                       78.4 (18.46x)
yuv2yuv1_16_512_accurate_c:                           1439.9 ( 1.00x)
yuv2yuv1_16_512_accurate_neon:                          77.6 (18.55x)
yuv2yuv1_16_512_approximate_c:                        1422.1 ( 1.00x)
yuv2yuv1_16_512_approximate_neon:                       78.1 (18.20x)
yuv2yuv1_19_512_accurate_c:                           1447.1 ( 1.00x)
yuv2yuv1_19_512_accurate_neon:                          78.1 (18.52x)
yuv2yuv1_19_512_approximate_c:                        1474.4 ( 1.00x)
yuv2yuv1_19_512_approximate_neon:                       78.1 (18.87x)

Signed-off-by: Martin Storsjö <martin@martin.st>
2025-02-07 12:05:06 +02:00
Michael Niedermayer
8a6ad9eab2
avformat/mxfdec: Check edit unit for overflow in mxf_set_current_edit_unit()
Fixes: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long'
Fixes: 392672068/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6232335892152320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-02-06 22:04:12 +01:00
Michael Niedermayer
cef3422b48
avformat/hls: Fix twitter
Allow mp4 with all mpegts extensions

Fixes: Ticket11435
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-02-06 22:04:11 +01:00
Kacper Michajłow
c17774a9ae
avformat/mov: fix eof check in mov_read_iinf()
This fix ensures that the loop stops early on EOF. The issue occurs
because mov_read_infe() performs a version check and skips unsupported
versions. The problem is that seeking within the stream clears the EOF
flag, causing avio_feof() to not function as expected. This is resolved
by moving the EOF check after reading the size and type, ensuring the
EOF flag is set when necessary.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-02-06 22:04:11 +01:00
Patrice Dumas
4d9cdf82ee doc/t2h: Support texinfo 7.1 and 7.2 pretest
Here is a proposed patch for portability of doc/t2h.pm for GNU Texinfo
7.1 and 7.1.90 (7.2 pretest).  I tested against 7.1 and 7.1.90 (7.2
pretest).  There is a difference in the headings compared to the website
version, maybe related to FA_ICONS not being set the same, but the
result seems correct.

I also renamed $element to $output_unit in ffmpeg_heading_command as in
new equivalent makeinfo/texi2any code the $element variable is the
$command variable in ffmpeg_heading_command, which is very confusing.  I
left as is the $command variable to have a patch easier to read, but it
could make sense to rename $command as $element later on.

The patch could also have effects with Texinfo 7.0, since some of the
changes are for that version, but that probably never show up because it
is for situations that may not exist in ffmpeg manuals (for example
@node without sectioning command), or because the code is robust to some
missing information (case of $heading_level in ffmpeg_heading_command
that was not set, as far as I can tell).

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-06 18:00:34 -03:00
Steven Zhou
d1fa9cf4b4 avfilter/drawtext: fix memory leak when using "reinit" runtime command
Free AVOption in drawtext private context when freeing old copy of drawtext
private context during processing of "reinit" runtime command.

Signed-off-by: Steven Zhou <steven.zhou@netint.ca>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-06 17:41:12 -03:00
James Almer
19045957af avcodec/ffv1enc_vulkan: add missing arguent to ff_ffv1_common_init()
Missed in 3d3ce9647f9b7a002080c7af12be654a90d2ba7c.

Found-by: kasper93
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-06 17:03:25 -03:00
James Almer
dc9e0ca447 fate/libswresample: add a test downmixing with a custom order layout
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-06 13:51:23 -03:00
James Almer
e504247db6 avcodec: add a ffv1 parser
Only setting frame and stream properties. No packetization is performed.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-06 13:48:47 -03:00
James Almer
3d3ce9647f avcodec/ffv1: split off and share frame header parsing code
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-06 13:46:58 -03:00
Gyan Doshi
6da82b4485 avfilter/xpsnr: avoid division by zero
The ref input may have its frame rate unset, which would then lead to
SIGFPE. So fall back to the main link frame rate. If that too is unset,
default to 0.

Related to #11428
2025-02-06 16:06:20 +05:30
Lynne
779a3187a8
ffv1dec: fix threaded decode failures
Fixes 7187eadf8c0f0c640f1d23811c55fad0cba60aa5

The issue is that while avctx->pix_fmt is synchronized between
threads, f->pix_fmt was not.

Fixes fate-vsynth1-ffv1-2pass10 with THREADS=2.
2025-02-06 06:57:07 +01:00
Tomas Härdin
9729444c7d lavf/mxfenc: Return AVERROR(EINVAL) in mxf_write_jpeg2000_subdesc() is pixfmt not set 2025-02-05 15:48:22 +01:00
Tomas Härdin
0202c7cc2e lavf/mxfenc: Make write_desc return int
This enables returning AVERRORs
2025-02-05 15:48:22 +01:00
James Almer
b9c99baced libswresample/rematrix: add support for custom order channel layouts
Limited to the same channels as a native layout, but not constrained by channel ordering.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-05 09:51:08 -03:00
James Almer
e52701d173 swresample/rematrix: split filling the matrix array into its own function
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-04 23:21:07 -03:00
Michael Niedermayer
33679f5325
avcodec/vvc/refs: fix negative pps_scaling_win offsets
The spec seems to allow these to  be negative

Fixes: left shift of negative value -15
Fixes: 392687035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-6559804532785152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-02-05 01:35:57 +01:00
James Almer
a750bcb237 avfilter/Makefile: add missing SKIPHEADERS for AMF
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-04 16:35:06 -03:00
James Almer
84ad9146e2 avutil/Makefile: fix SKIPHEADERS for AMF
Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-04 16:34:51 -03:00
James Almer
1fbe9deee3 avcodec/nvenc: add support for writing mastering metadata SEI messages
Including Mastering Display and Content Light Level.
Requires SDK 13.0, and only supports HEVC and AV1.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-04 14:28:19 -03:00
James Almer
a8595dae0f doc/ffmpeg: update example command line for IAMF muxing
Missed in 8f6a1a06a692f39abde24e09fecc3de26935657d.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-04 13:48:11 -03:00