Timo Rothenpieler
9c8a6ac85c
configure: fix naming of some C++/cxx functions being mislabeled as cpp
2025-09-14 11:45:11 +00:00
Timo Rothenpieler
0ce413af9c
configure: properly split C/CXX and CPP flags
...
Right now, CFLAGS like -std=c17 leak onto the C++ compilers commandline,
leading to tons of warnings and even some errors.
Undefining __STRICT_ANSI__ causes strong warnings from the stdlib
headers. So only set it for C.
2025-09-14 11:45:11 +00:00
Timo Rothenpieler
0362cb3806
build: link with CXX when -lstdc++ on linker commandline
2025-09-14 11:45:11 +00:00
Andreas Rheinhardt
bdb81d9347
avcodec/rkmppdec: Close decoder generically on init failure
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-14 10:47:57 +00:00
Andreas Rheinhardt
b02f1129eb
swresample/resample, soxr_resample: Use designated initializers
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-13 21:25:40 +00:00
Timo Rothenpieler
4c80cda08a
forgejo: make aarch64 asm linter part of pre-commit
...
Needed some minor semantical changes to the shell wrapper, since
pre-commit expects it to exit with an error when applying fixes.
2025-09-13 20:58:29 +00:00
Martin Storsjö
edd1b93e53
forgejo: Check the aarch64 assembly indentation as part of the lint job
...
Alternatively, this could be a separate job, potentially keyed
to only run on PRs that touch files matching */aarch64/*. But
as this runs very quickly, it's probably less clutter to just
bundle it here.
2025-09-13 20:58:29 +00:00
Martin Storsjö
a3ce337926
tools: Add scripts for indenting and checking aarch64 assembly
...
The same also applies for arm assembly, but there are more known
deviations within that.
Add a script which checks all files, except for a few known files
that deviate, for various reasons.
2025-09-13 20:58:29 +00:00
Andreas Rheinhardt
0ba0cf94db
avcodec/bsf/noise: Avoid allocation for string
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-13 20:45:42 +00:00
Andreas Rheinhardt
9ae42d42e6
avcodec/dvdsubdec: Don't return value != 0 on init success
...
Currently, any nonnegative return value from an init function
is just treated as success and otherwise ignored; while it is
not explicitly forbidden to return something else than 0 (there
is no documentation whatsoever), the assumption is that
they return zero on success. So change dvdsubdec.c accordingly.
Also change dvdsub_parse_extradata() to return zero on success.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-13 20:37:03 +00:00
Andreas Rheinhardt
1df63acdc4
avcodec: Add av_cold to flush,init,close functions missing it
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-13 20:37:03 +00:00
Andreas Rheinhardt
bc545bae3b
tests/checkasm/sw_ops: Avoid 1 << 32
...
It is UB.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-13 21:27:27 +02:00
Kacper Michajłow
1294ab5db1
swscale/ops_tmpl_int: remove unused arguments from wrap read decl
...
Signed-off-by: Kacper Michajłow <kasper93@gmail.com >
2025-09-13 19:12:44 +02:00
Kacper Michajłow
66faef3dbe
swscale/ops_chain: add type removed ff_sws_op_chain_free_cb
...
to avoid pointer casting and UB of calling function with different
pointer type.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com >
2025-09-13 18:14:02 +02:00
Andreas Rheinhardt
a4fd3f27f4
swscale/x86/ops: Fix leak
...
Reviewed-by: Niklas Haas <ffmpeg@haasn.dev >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 22:42:30 +02:00
Andreas Rheinhardt
c74ee4ceff
swscale/ops_chain: Free correct pointer on error
...
Reviewed-by: Niklas Haas <ffmpeg@haasn.dev >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 22:41:24 +02:00
Andreas Rheinhardt
6384254db2
avcodec/mpegaudiodec_template: Avoid write-only stores
...
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 21:39:27 +02:00
Andreas Rheinhardt
8728271097
avcodec/mpegaudiodec_template: Mark flush functions as av_cold
...
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 21:39:22 +02:00
Andreas Rheinhardt
f611459e6f
avcodec/mpegaudiodec_template: Allocate sub-contexts jointly
...
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 21:39:16 +02:00
Andreas Rheinhardt
84f4b9fc1f
avcodec/mpegaudiodec_template: Don't modify AVCodecContext.priv_data
...
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 21:38:48 +02:00
Andreas Rheinhardt
87cb7c871b
avcodec/pcm_tablegen: Fix hardcoded-tables if alaw,mulaw,vidc codecs disabled
...
Since ae448e00af
the various
tableinit functions are not compiled unconditionally any more,
so that pcm_tablegen.c (which creates the hardcoded tables)
needs to be updated.
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 21:37:42 +02:00
Andreas Rheinhardt
f49de7018a
avcodec/Makefile: Add adpcm_vima->adpcm.o dependency
...
Forgotten in 9141fe9653
.
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-12 17:11:26 +02:00
James Almer
799c133273
avutil/tests/aes_ctr: extend the test to cover payloads smaller than a block
...
Signed-off-by: James Almer <jamrial@gmail.com >
2025-09-11 18:32:24 -03:00
James Almer
335ba4a649
avutil/aes_ctr: reintroduce the block offset state
...
Wrongly removed in fe73b84879
, it's required for
calls with a payload smaller than a full block.
Fixes issue #20474 .
Signed-off-by: James Almer <jamrial@gmail.com >
2025-09-11 18:32:23 -03:00
Zhao Zhili
c1dc2e2b7c
avcodec/videotoolboxenc: ensure bitrate is set in low_delay mode
...
VideoToolbox doesn't support automatic bitrate in low delay mode.
Check bitrate and show error message so user knows what's going
wrong.
2025-09-10 20:33:40 +08:00
Cameron Gutman
d87210745e
avcodec/videotoolboxenc: allow low latency RC with HEVC
...
It is supported only for H.264 on Intel Macs, but it can be used with
both H.264 and HEVC on Apple Silicon.
Signed-off-by: Cameron Gutman <aicommander@gmail.com >
2025-09-10 11:55:18 +00:00
Tong Wu
4691c56238
forgejo/CODEOWNERS: add myself to d3d12va related files
...
Signed-off-by: Tong Wu <wutong1208@outlook.com >
2025-09-10 11:39:17 +00:00
Marvin Scholz
2a1d5dd720
fftools: use fopen_utf8 to open FFREPORT
...
Should fix #11240
2025-09-10 11:38:43 +00:00
Georgii Zagoruiko
4fbacb3944
avcodec/aarch64/vvc: Optimised version of classify function.
...
Macbook Air (M2):
vvc_alf_classify_8x8_8_c: 2.6 ( 1.00x)
vvc_alf_classify_8x8_8_neon: 1.0 ( 2.47x)
vvc_alf_classify_8x8_10_c: 2.7 ( 1.00x)
vvc_alf_classify_8x8_10_neon: 0.9 ( 2.98x)
vvc_alf_classify_8x8_12_c: 2.7 ( 1.00x)
vvc_alf_classify_8x8_12_neon: 0.9 ( 2.97x)
vvc_alf_classify_16x16_8_c: 7.3 ( 1.00x)
vvc_alf_classify_16x16_8_neon: 3.4 ( 2.12x)
vvc_alf_classify_16x16_10_c: 4.3 ( 1.00x)
vvc_alf_classify_16x16_10_neon: 2.9 ( 1.47x)
vvc_alf_classify_16x16_12_c: 4.3 ( 1.00x)
vvc_alf_classify_16x16_12_neon: 3.0 ( 1.44x)
vvc_alf_classify_32x32_8_c: 13.7 ( 1.00x)
vvc_alf_classify_32x32_8_neon: 10.7 ( 1.29x)
vvc_alf_classify_32x32_10_c: 12.3 ( 1.00x)
vvc_alf_classify_32x32_10_neon: 8.7 ( 1.42x)
vvc_alf_classify_32x32_12_c: 12.2 ( 1.00x)
vvc_alf_classify_32x32_12_neon: 8.7 ( 1.40x)
vvc_alf_classify_64x64_8_c: 45.8 ( 1.00x)
vvc_alf_classify_64x64_8_neon: 37.1 ( 1.23x)
vvc_alf_classify_64x64_10_c: 41.3 ( 1.00x)
vvc_alf_classify_64x64_10_neon: 32.8 ( 1.26x)
vvc_alf_classify_64x64_12_c: 41.4 ( 1.00x)
vvc_alf_classify_64x64_12_neon: 32.4 ( 1.28x)
vvc_alf_classify_128x128_8_c: 163.7 ( 1.00x)
vvc_alf_classify_128x128_8_neon: 138.3 ( 1.18x)
vvc_alf_classify_128x128_10_c: 149.1 ( 1.00x)
vvc_alf_classify_128x128_10_neon: 120.3 ( 1.24x)
vvc_alf_classify_128x128_12_c: 148.7 ( 1.00x)
vvc_alf_classify_128x128_12_neon: 119.4 ( 1.25x)
RPi4 (Cortex-A72):
vvc_alf_classify_8x8_8_c: 1251.6 ( 1.00x)
vvc_alf_classify_8x8_8_neon: 700.7 ( 1.79x)
vvc_alf_classify_8x8_10_c: 1141.9 ( 1.00x)
vvc_alf_classify_8x8_10_neon: 659.7 ( 1.73x)
vvc_alf_classify_8x8_12_c: 1075.8 ( 1.00x)
vvc_alf_classify_8x8_12_neon: 658.7 ( 1.63x)
vvc_alf_classify_16x16_8_c: 3574.1 ( 1.00x)
vvc_alf_classify_16x16_8_neon: 1849.8 ( 1.93x)
vvc_alf_classify_16x16_10_c: 3270.0 ( 1.00x)
vvc_alf_classify_16x16_10_neon: 1786.1 ( 1.83x)
vvc_alf_classify_16x16_12_c: 3271.7 ( 1.00x)
vvc_alf_classify_16x16_12_neon: 1785.5 ( 1.83x)
vvc_alf_classify_32x32_8_c: 12451.9 ( 1.00x)
vvc_alf_classify_32x32_8_neon: 5984.3 ( 2.08x)
vvc_alf_classify_32x32_10_c: 11428.9 ( 1.00x)
vvc_alf_classify_32x32_10_neon: 5756.3 ( 1.99x)
vvc_alf_classify_32x32_12_c: 11252.8 ( 1.00x)
vvc_alf_classify_32x32_12_neon: 5755.7 ( 1.96x)
vvc_alf_classify_64x64_8_c: 47625.5 ( 1.00x)
vvc_alf_classify_64x64_8_neon: 21071.9 ( 2.26x)
vvc_alf_classify_64x64_10_c: 44576.3 ( 1.00x)
vvc_alf_classify_64x64_10_neon: 21544.7 ( 2.07x)
vvc_alf_classify_64x64_12_c: 44600.5 ( 1.00x)
vvc_alf_classify_64x64_12_neon: 21491.2 ( 2.08x)
vvc_alf_classify_128x128_8_c: 192143.3 ( 1.00x)
vvc_alf_classify_128x128_8_neon: 82387.6 ( 2.33x)
vvc_alf_classify_128x128_10_c: 177583.1 ( 1.00x)
vvc_alf_classify_128x128_10_neon: 81628.8 ( 2.18x)
vvc_alf_classify_128x128_12_c: 177582.2 ( 1.00x)
vvc_alf_classify_128x128_12_neon: 81625.1 ( 2.18x)
2025-09-09 22:13:04 +01:00
Krzysztof Pyrkosz
de25cb4603
avcodec/aarch64/vvc: Optimize vvc_apply_bdof_block_8x
...
Before and after:
A53:
apply_bdof_8_8x16_neon: 3320.5 ( 4.02x)
apply_bdof_10_8x16_neon: 3317.8 ( 3.90x)
apply_bdof_12_8x16_neon: 3303.6 ( 3.91x)
apply_bdof_8_8x16_neon: 3168.1 ( 4.23x)
apply_bdof_10_8x16_neon: 3127.8 ( 4.13x)
apply_bdof_12_8x16_neon: 3119.3 ( 4.18x)
A72:
apply_bdof_8_8x16_neon: 1827.4 ( 5.02x)
apply_bdof_10_8x16_neon: 1838.5 ( 4.89x)
apply_bdof_12_8x16_neon: 1841.1 ( 4.83x)
apply_bdof_8_8x16_neon: 1691.6 ( 5.46x)
apply_bdof_10_8x16_neon: 1695.9 ( 5.23x)
apply_bdof_12_8x16_neon: 1695.4 ( 5.29x)
A78
apply_bdof_8_8x16_neon: 648.9 ( 7.43x)
apply_bdof_10_8x16_neon: 646.1 ( 7.04x)
apply_bdof_12_8x16_neon: 643.8 ( 7.04x)
apply_bdof_8_8x16_neon: 603.2 ( 7.97x)
apply_bdof_10_8x16_neon: 604.1 ( 7.52x)
apply_bdof_12_8x16_neon: 604.5 ( 7.52x)
2025-09-09 16:37:28 +00:00
Niklas Haas
5f39965dd6
avfilter/buffersink: remove unneeded parameter
...
This is a newly added field, so there's no point to try and keep backwards
compatibility with an older API - newer clients should just use the new
fields.
2025-09-09 14:52:01 +02:00
averne
5aa541c690
fate/prores: Fix missing dependency
...
Signed-off-by: averne <averne381@gmail.com >
2025-09-09 12:04:05 +00:00
James Almer
05b6b30ee1
fftools/ffplay: set the alphamodes buffersink array option instead of the binary one
...
And add the missing goto fail. This should ensure the alpha mode is set and remove
bogus warnings printed by ffplay.
Signed-off-by: James Almer <jamrial@gmail.com >
2025-09-08 18:38:16 -03:00
James Almer
23b759e99e
avfilter/buffersink: add missing checks for alphamodes
...
Signed-off-by: James Almer <jamrial@gmail.com >
2025-09-08 18:38:16 -03:00
Frank Plowman
e9a6b75373
lavc/cbs: Make error message more descriptive
2025-09-08 21:13:09 +00:00
dariusz-f
c75439a93b
Update libavformat/apvdec.c
...
Increase au_size limit by 4 times to fit more complex videos.
Signed-off-by: dariusz-f <dariusz-f@noreply.code.ffmpeg.org >
2025-09-08 20:59:31 +00:00
Dariusz Frankiewicz
002a940ca6
avformat/apv: fix range of au_size
...
Acces unit size is described in documentation as > 0 < 0xFFFFFFFF
Signed-off-by: Dariusz Frankiewicz <d.frankiewic@samsung.com >
2025-09-08 20:59:31 +00:00
Zhao Zhili
09856e4e48
doc/examples/vaapi_encode: fix invalid check on fwrite
...
enc_pkt->size is 0 after av_packet_unref, which makes the check invalid.
Fix regression from 3e4bfff2
.
Co-Authored-by: Jin Bo <jinbo@loongson.cn >
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2025-09-08 20:43:07 +00:00
Krzysztof Pyrkosz
7b21bde34c
avcodec/aarch64/vvc: Implemented dmvr_h_10
...
A78:
dmvr_h_10_12x20_neon: 82.2 ( 6.49x)
dmvr_h_10_20x12_neon: 69.9 ( 3.66x)
dmvr_h_10_20x20_neon: 112.5 ( 3.74x)
dmvr_h_12_12x20_neon: 81.4 ( 6.51x)
dmvr_h_12_20x12_neon: 69.2 ( 3.74x)
dmvr_h_12_20x20_neon: 110.2 ( 3.85x)
A72:
dmvr_h_10_12x20_neon: 234.1 ( 4.67x)
dmvr_h_10_20x12_neon: 221.4 ( 3.48x)
dmvr_h_10_20x20_neon: 356.9 ( 3.59x)
dmvr_h_12_12x20_neon: 234.1 ( 4.67x)
dmvr_h_12_20x12_neon: 221.5 ( 3.53x)
dmvr_h_12_20x20_neon: 357.0 ( 3.64x)
2025-09-08 17:51:20 +00:00
Krzysztof Pyrkosz
189e841cfd
avcodec/aarch64/vvc: Implement dmvr_h_8
...
A78:
dmvr_h_8_12x20_neon: 76.6 ( 4.31x)
dmvr_h_8_20x12_neon: 65.8 ( 3.49x)
dmvr_h_8_20x20_neon: 106.6 ( 3.62x)
A72:
dmvr_h_8_12x20_neon: 190.6 ( 4.40x)
dmvr_h_8_20x12_neon: 171.1 ( 4.31x)
dmvr_h_8_20x20_neon: 275.1 ( 4.50x)
2025-09-08 17:51:20 +00:00
Dmitrii Ovchinnikov
1b97966199
avutil/hwcontext_d3d12va: added resource and heap flags to DeviceContext
2025-09-08 15:44:47 +00:00
DE-AI
fbbb2996d5
vc1_parser: Reset unesc_index after extracting header with complete frames
...
When PARSER_FLAG_COMPLETE_FRAMES is set (e.g. in Matroska),
unesc_index is not reset after the first frame, which causes
subsequent frames to inherit leftover header data.
This leads to incorrect keyframe marking and broken decoding.
See also this bug report: https://trac.ffmpeg.org/ticket/8515
Signed-off-by: DE-AI <max.christoph@pentaxmedical.com >
2025-09-08 14:03:52 +00:00
Niklas Haas
1f2de0f618
avfilter/vf_libplacebo: ensure linear tex is blittable
...
Required to clear textures to a background color.
2025-09-08 15:42:01 +02:00
Timo Rothenpieler
f8a300c673
configure: fix CUDA compilation with SDK version 13 nvcc
...
Compute Capability 7.5 is now the lowest supported version.
Fixes #20454
2025-09-08 14:25:44 +02:00
Tong Wu
45db6945e9
avcodec/vaapi_encode: avoid potential overflow
...
The max_frame_size in byte will be filled in
VAEncMiscParameterBufferMaxFrameSize which receives size in bit.
This requires max_frame_size * 8.
Signed-off-by: Tong Wu <wutong1208@outlook.com >
2025-09-08 00:19:06 +00:00
Alan Kelly
f4b044bbe3
swscale: Disable avx2 hscale 8to15 on IceLake and below due to Intel Gather Data Sampling mitigation performance loss
...
Intel provided a microcode update to mitigate this security
vulnerability which has a huge negative performance impact on gather
instructions. This means that hscale 8to15 avx2, which uses gather
extensively, is no longer faster than SSSE3 on impacted CPUs.
https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/gather-data-sampling.html
Broadwell:
hscale_8_to_15__fs_4_dstW_512_c: 3379.5 ( 1.00x)
hscale_8_to_15__fs_4_dstW_512_sse2: 615.7 ( 5.49x)
hscale_8_to_15__fs_4_dstW_512_ssse3: 613.4 ( 5.51x)
hscale_8_to_15__fs_4_dstW_512_avx2: 495.7 ( 6.82x)
Skylake:
hscale_8_to_15__fs_4_dstW_512_c: 3411.4 ( 1.00x)
hscale_8_to_15__fs_4_dstW_512_sse2: 591.0 ( 5.77x)
hscale_8_to_15__fs_4_dstW_512_ssse3: 591.5 ( 5.77x)
hscale_8_to_15__fs_4_dstW_512_avx2: 1386.2 ( 2.46x)
Cascade Lake:
hscale_8_to_15__fs_4_dstW_512_c: 3231.3 ( 1.00x)
hscale_8_to_15__fs_4_dstW_512_sse2: 517.9 ( 6.24x)
hscale_8_to_15__fs_4_dstW_512_ssse3: 521.6 ( 6.19x)
hscale_8_to_15__fs_4_dstW_512_avx2: 1775.0 ( 1.82x)
Sapphire Rapids:
hscale_8_to_15__fs_4_dstW_512_c: 1840.0 ( 1.00x)
hscale_8_to_15__fs_4_dstW_512_sse2: 287.9 ( 6.39x)
hscale_8_to_15__fs_4_dstW_512_ssse3: 293.8 ( 6.26x)
hscale_8_to_15__fs_4_dstW_512_avx2: 219.2 ( 8.40x)
2025-09-06 20:57:48 +00:00
Leo Izen
1dcb0c6c3e
avcodec/libjxldec: consume input on error
...
libjxl consumes no input if it returns an error, so this loops over
and over while it spits out the same error many times. If we got an
error from libjxl and consumed no input, then we instead consume the
whole packet.
Signed-off-by: Leo Izen <leo.izen@gmail.com >
2025-09-06 15:51:41 -04:00
Leo Izen
74e61981b5
avcodec/decode: treat orientation 1 as valid displaymatrix
...
Since 9dc79241d9
we now always pop the
orientation off of the IFD and use a display matrix instead. This means
we should not produce a warning and refuse if the orientation field
indicates a default orientation (i.e. 1).
Signed-off-by: Leo Izen <leo.izen@gmail.com >
Reported-by: Ramiro Polla <ramiro.polla@gmail.com >
2025-09-06 13:15:24 -04:00
Zhao Zhili
742474bc24
avformat/mov: fix unused variable entry in parse_exif_item
2025-09-06 15:11:48 +00:00
Zhao Zhili
1ca2c68278
avcodec/pcm: fix some unused variables/functions warning
...
v is unused when ALAW/MULAW/VIDC are disabled.
2025-09-06 15:11:48 +00:00