Commit Graph

121153 Commits

Author SHA1 Message Date
Niklas Haas
2b67137daa avfilter/vf_idet: correctly reset pixdesc on format change 2025-09-21 11:02:41 +00:00
Niklas Haas
5830743363 avfilter/vf_idet: separate DSP parts
To avoid pulling in the entire libavfilter when using the DSP functions
from checkasm.

The rest of the struct is not needed outside vf_idet.c and was moved there.
2025-09-21 11:02:41 +00:00
Niklas Haas
367febc491 avfilter/vf_idet: expose DSP init function internally
For checkasm.
2025-09-21 11:02:41 +00:00
Zhao Zhili
e02e6d54b0 tests/fate/demux: add hxvs test case 2025-09-21 17:42:19 +08:00
Zhao Zhili
dcddb2bf08 avformat: add hxvs demuxer 2025-09-21 17:42:19 +08:00
Brad Smith
db0b86a4ad avformat/udp: fix warning about unused varible
libavformat/udp.c:283:9: warning: unused variable 'i' [-Wunused-variable]

Signed-off-by: Brad Smith <brad@comstyle.com>
2025-09-20 22:59:50 -04:00
Michael Niedermayer
55e71768cf avformat/dhav: Fix off by length of read element error
Fixes: out of array read
Fixes: BIGSLEEP-445383648
Fixes: crash_input_1/2/3.dhav

Found-by: Google Big Sleep
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-21 00:49:44 +00:00
Lynne
8d65da767b lavf: fix demuxing of FLAC files with id3v2 tags
Due to the recent id3v2 refactor, FLAC was left out due to
earlier code not checking for id3v2 presence on FLAC.
Without the id3v2 data parsed, detection of FLAC and therefore
demuxing fails.

Fixes 9d037c54f2
2025-09-20 22:46:39 +09:00
Lynne
99285cba21 lavf/id3v2: report incorrect BOM value on error 2025-09-20 22:46:35 +09:00
Henrik Gramner
82b5a0faba vp9: Remove 8bpc AVX asm for inverse transforms
There's very little performance difference vs SSE2/SSSE3 and most
systems will use the AVX2 implementations anyway.

This reduces code size and compilation time by a significant amount.
2025-09-19 23:12:59 +00:00
Henrik Gramner
0b5d46ee1c vp9: Add 8bpc AVX2 asm for inverse transforms 2025-09-19 23:12:59 +00:00
Andreas Rheinhardt
49b5c17e09 avformat/mccdec: Constify data
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:31:10 +02:00
Andreas Rheinhardt
cce1af5413 avformat/mccenc: Hardcode codec names
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:31:05 +02:00
Andreas Rheinhardt
f65875c082 avformat/mccdec: Avoid relocations
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:31:02 +02:00
Andreas Rheinhardt
e965fe9057 avformat/mccenc: Avoid relocations
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:59 +02:00
Andreas Rheinhardt
28f0b7a237 avformat/mccenc: Add newlines to logmessages
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:53 +02:00
Andreas Rheinhardt
3c79219e93 avformat/mccenc: Check version-timecode compatibility earlier
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:33 +02:00
Andreas Rheinhardt
159330016c avformat/mccenc: Deduplicate strings
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:28 +02:00
Andreas Rheinhardt
d81a971b35 avformat/mccenc: Constify read-only data
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:24 +02:00
Andreas Rheinhardt
62dd3e1e7d avformat/mccenc: Remove redundant setting of time base
It has already been done in init.

Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:20 +02:00
Andreas Rheinhardt
0cd78bddc4 avformat/mccenc: Fix assert check
Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:30:17 +02:00
Andreas Rheinhardt
a34a85ed54 avformat/mccenc: Remove redundant check
This has already been checked in init.

Reviewed-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-20 00:29:41 +02:00
Marton Balint
82a09aef05 avformat/urldecode: factorize core url decoding from ff_urldecode
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
23cf2c5f01 avformat/urldecode: fix decoding last char if it was percent encoded
The length check was too strict and if the end of the string was a percent
encoded sequence it did not decode correctly.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
b0314dc76e avformat/rtpproto: use proper return error codes in rtp_open
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
3a29702cb6 avformat/rtpproto: add some URL options as AVOption aliases
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
f2be0e68ef avformat/tls: move AVClass to TLSShared
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
b2184a9741 avformat/tls: use AV_OPT_TYPE_BOOL for some AVOptions
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
7d1e22b7ea avformat/tls: add some URL options as AVOption aliases
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
ca8cba4eac avformat/udp: factorize warning unsupported options for builds without PTHREAD_CANCEL
Also fix 'circular_buffer_size' parameter name in the message and the
'fifo_size' option description.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
3e7314fe30 avformat/udp: add DSCP as a normal AVOption
Previously this was an URL-only option.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Kacper Michajłow
1ce3f9fdab forgejo/workflows: run fate-build
It's not included in make fate target.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-18 16:53:05 +00:00
Jack Lau
c74181a04b avformat/tls_gnutls: add av_assert0() for tls_shared
Signed-off-by: Jack Lau <jacklau1222@qq.com>
2025-09-18 12:34:15 +00:00
Jack Lau
df7532b21d avformat/tls_gnutls: add initial dtls support
Set GNUTLS_DATAGRAM flag when is_dtls is true.
Set mtu when it's specified.
Modify the read/write function could use udp socket.

There are more patches to make dtls really work.

Signed-off-by: Jack Lau <jacklau1222@qq.com>
2025-09-18 12:34:15 +00:00
Michael Niedermayer
647138334a avcodec/exif: check count in exif_decode_tag()
Fixes: out of array access
Fixes: integer overflow
Fixes: poc_heap_bof

Found-by: *2ourc3 (Salim LARGO)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-18 11:06:16 +00:00
Michael Niedermayer
88e04205b3 avcodec/exif: Do not leave uninitialized pointers on errors in exif_clone_entry()
No testcase, but this looks like it could free garbage pointers

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-18 11:06:16 +00:00
Michael Niedermayer
742b0d4675 avcodec/exif: Use av_fast_mallocz() in av_exif_clone_ifd()
using fast realloc leaves the entries uninitialized and frees garbage pointers on
errors

Fixes: bug_triggering_file

Found-by: *2ourc3, 5pider
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-18 11:06:16 +00:00
Kacper Michajłow
c373636f55 avfilter/vsrc_gfxcapture: fix string format specifier
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-18 03:55:54 +02:00
Timo Rothenpieler
61835e1d8b avfilter/vsrc_gfxcapture: keep cbdata object alive
Depending on the threading backend the stdlib uses, creating a
mutex/condvar can be quite expensive.
So keep this object alive in the ctx, on which we synchronize via the
uninit mutex anyway.
2025-09-18 01:04:59 +00:00
Timo Rothenpieler
c4e537793b avfilter/vsrc_gfxcapture: fix leaking all callback handlers
Fixes #20537
2025-09-18 01:04:59 +00:00
Timo Rothenpieler
1849068c65 avfilter/vsrc_gfxcapture: use free threaded capture frame pool
Apparently, using a normal frame pool in a multithreaded environment
leads to strange resource leaks on shutdown, which vanish when using a
free threaded pool.
2025-09-18 01:04:59 +00:00
Timo Rothenpieler
4879c9f4e2 avfilter/vsrc_gfxcapture: stop capture session before initializing capture thread shutdown
It might have things going on in the background that still need cleaned
up, and this gives it a chance to enqueue them on the dispatch queue.
2025-09-18 01:04:59 +00:00
Timo Rothenpieler
23d9412ff9 avfilter/vsrc_gfxcapture: fix re-using ret variable from outside of lambda scope 2025-09-18 01:04:59 +00:00
Timo Rothenpieler
983fed34f8 avfilter/vsrc_gfxcapture: don't pass pointer to ComPtr
While it does appear to work fine, with all the operator overloads, it
at least has potential for surprises, so pass it by reference instead.
2025-09-18 01:04:59 +00:00
Andreas Rheinhardt
8accbbdf9a avcodec/vvc/data: Mark tables as hidden
This allows compilers to optimize accesses like
ff_vvc_diag_scan_x[2][2][x] by baking the offset derived
from [2][2] into the relocation (so that it is performed
at link-time).

Reviewed-by: Wu Jianhua <toqsxw@outlook.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-17 22:48:39 +02:00
Timo Rothenpieler
efd484cb2d avutil/hwcontext_d3d11va: remove D3D11_BIND_RENDER_TARGET restriction for array textures
This was added in 4f78711f9c, with the
commit message claiming that it's a Microsoft restriction that array
textures with ArraySize > 2 cannot be created with
D3D11_BIND_RENDER_TARGET.

I was unable to find any documentation or other references on that, and
a quick test also found it to not be the case. So this patch removes
that restriction.

This enables frame sources, like the d3d11 capture filters, to output
frames in an array texture, which is neccesary to pass those frames as
input to some hardware encoders.
2025-09-17 14:50:41 +00:00
Timo Rothenpieler
00ddb408c5 avfilter/vsrc_ddagrab: support rendering mouse cursor onto array textures 2025-09-17 14:50:41 +00:00
Cameron Gutman
a0936b9769 avcodec/vaapi_encode: skip AVBR if HRD parameters are set
AVBR does not use VAEncMiscParameterTypeHRD, so attempting to set
rc_buffer_size and bit_rate together will cause the rc_buffer_size
to be ignored if the VAAPI driver supports AVBR. We should prefer
regular VBR for that case.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
2025-09-17 06:40:16 +00:00
James Almer
c6297b689f tests/fate/image: add Exif rotation metadata tests
Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-17 02:17:09 +00:00
James Almer
ca72b2d712 avcodec/tiffenc: support writing Orientation tag
Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-17 02:17:09 +00:00