Commit Graph

7284 Commits

Author SHA1 Message Date
openvela-robot 2abdb3a8da cbs: Always check for bitstream end before reading 2026-04-20 19:37:39 +08:00
Jesse Liu a0cc5d3a3a add missing ignore files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:35 +08:00
Clément Bœsch 6750607967 lavu/timer.h: add Linux Perf API support
Refer to "checkasm: use perf API on Linux ARM*" commit for the
rationale.

The implementation is somehow duplicated with checkasm, but so is the
current usage of AV_READ_TIME(). Until these implementations and
heuristics are made consistent, I don't see a way of sharing that code.

Note: when using libavutil/timer.h, it is now important to include
before any other include due to the _GNU_SOURCE requirement.
2026-04-20 19:37:33 +08:00
Clément Bœsch e1e001f626 lavu/tests: move timer.h include earlier
In the next commit, timer.h will require a _GNU_SOURCE to be set before
including system headers. This commit prevents compilation failures.
2026-04-20 19:37:33 +08:00
Clément Bœsch 04039c3301 lavu/tests/des: rename crypt to crypt_ref
This will prevent a symbol clash with crypt(3) after unistd.h is
included.
2026-04-20 19:37:33 +08:00
Clément Bœsch a7c4f43c3c lavu/timer.h: factor out timer report
This commit is meant to reduce the diff in the following one.
2026-04-20 19:37:33 +08:00
Kaustubh Raste 32c311a363 avcodec/mips: Improve vp9 mc msa functions
Load the specific destination bytes instead of MSA load and pack.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:33 +08:00
openvela-robot 56294c9719 avfilter/vf_datascope: make it possible for output window to automatically change position
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:37:29 +08:00
openvela-robot c727fd9de4 flvdec: Check the avio_seek return value after reading a metadata packet
If the metadata packet is corrupted, flv_read_metabody can accidentally
read past the start of the next packet. If the start of the next packet
had been flushed out of the IO buffer, we would be unable to seek to
the right position (on a nonseekable stream).

Prefer to clearly error out instead of silently trying to read from a
desynced stream which will only be interpreted as garbage.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:37:26 +08:00
openvela-robot 3111366040 avcodec/diracdec: Fix integer overflow in INTRA_DC_PRED()
Fixes: runtime error: signed integer overflow: 1168175789 + 1168178473 cannot be represented in type 'int'
Fixes: 3081/clusterfuzz-testcase-minimized-4807564879462400
Fixes: 2844/clusterfuzz-testcase-minimized-5561715838156800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:37:22 +08:00
openvela-robot 64a2fcfaa9 Revert "checkasm: Test more h264 idct variants"
This reverts commit 547db1eaec.

This commit wasn't supposed to be pushed (yet) since it hasn't
been reviewed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:37:20 +08:00
openvela-robot 17e8e04310 avcodec/fits: add missing header includes
Fixes checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 19:37:14 +08:00
openvela-robot c83c6794f5 msvc: Properly specify dllexport for data symbols shared across dll boundaries
We currently only have exported data symbols within libavcodec, but
the concept is easy to extend to other libraries if necessary.
The attribute declaration needs to be in a private header though,
since we can't use CONFIG_SHARED in public installed headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:37:11 +08:00
Martin Storsjö 91711a2c50 Remove support for building for mingw32ce (Windows CE)
The toolchain for this target is unmaintained since many years.

While it has been continuously build tested on fate, it hasn't
actually been tested at runtime since many, many years (and back
then, only a few codecs in libavcodec were tested).

So far, keeping support for it has been mostly effortless, but
the compiler does seem to have issues with dllimported data symbols,
ending up as internal compiler errors in some cases. Instead of
jumping through further hoops to work around that, just remove the
target.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:37:09 +08:00
openvela-robot c5ed9f1ee5 avfilter/vf_libvmaf: fix pre convert to framesync2 bugs
Hi, it fixes the errors while converting to framesync2.
libvmaf was changed recently, double *score variable is removed in the new
version since it's not used anywhere. This patch fixes all the warnings and
segmentation faults.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2026-04-20 19:37:07 +08:00
openvela-robot 51c82b2c0e lavf: make avio_read_partial() public
Main use-case is proxying avio through a foreign I/O layer and a custom
AVIO context, without losing latency and performance characteristics.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:37:05 +08:00
openvela-robot 8f53bc3adc lavc/vaapi_encode_h265: Enable VBR mode
Follow vaapi_h264 style, enable the VBR mode.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:36:59 +08:00
openvela-robot d6b24a2408 swscale: Do not expand a macro with 'defined' in it
Fixes:

    libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
    #if USE_MMAP
        ^
    libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
    #define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
                                                    ^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:36:57 +08:00
Timo Rothenpieler fd036e00fe libavutil/opencl: fix potential null dereference
Fixes CID 1396840

Reviewed-by: Wei Gao <highgod0401@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2026-04-20 19:36:54 +08:00
openvela-robot 4af5536f55 avfilter/af_agate: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 19:36:50 +08:00
openvela-robot c0df136248 configure: Include d3d11va_extralibs in libavutil
This fixes shared WinRT/UWP builds with d3d11va enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:36:48 +08:00
openvela-robot 5bfef89719 libavdevice/decklink: configurablity to set max queue size
Signed-off-by: Ravindra Patagar <rpatagar@akamai.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 19:36:43 +08:00
openvela-robot 8a6966744a yadif: Account for the buffer alignment while processing the frame edges
Avoid out of bound reads.

Bug-Id: 1031
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 19:36:41 +08:00
Martin Storsjö 902090e11b aarch64: Fix negative movrel offsets for windows
On windows, the offset for the relocation doesn't get stored in
the relocation itself, but as an unsigned immediate in the opcode.
Therefore, negative offsets has to be handled via a separate sub
instruction, just as on MachO.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 19:36:38 +08:00
openvela-robot 36baa52d31 lavc/g726: Add a little-endian G.726 encoder.
Fixes ticket #6596.
2026-04-20 19:36:37 +08:00
openvela-robot d82712c491 png: Report more details regarding unsupported pixel formats 2026-04-20 19:36:35 +08:00
openvela-robot 9273b63c15 avfilter/vf_pseudocolor: add support for some subsampled formats 2026-04-20 19:36:32 +08:00
openvela-robot e3613e06db lavc: Add mpeg2_metadata bitstream filter 2026-04-20 19:36:29 +08:00
openvela-robot 88e5255639 lavc/vaapi_encode_h264: add "coder" option support
Follow libx264 style to support "coder" option, and set it to
cabac by default.

Signed-off-by: Yi A Wang <yi.a.wang@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2026-04-20 19:36:26 +08:00
openvela-robot 4b41db93bc cbs_h2645: Return error if writing fails 2026-04-20 19:36:23 +08:00
Paul B Mahol 3f8371ef24 avutil/eval: add linear interpolation helper 2026-04-20 19:36:20 +08:00
openvela-robot 66eb88b55e Add macros to x86util.asm .
Improved version of VBROADCASTSS that works like the avx2 instruction.
Emulation of vpbroadcastd.
Horizontal sum HSUMPS that places the result in all elements.
Emulation of blendvps and pblendvb.

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
2026-04-20 19:36:19 +08:00
openvela-robot 525be6b180 h264dec: use a large enough field for reference list modification values
pic_num can be at most 17-bit, so uint8_t is not sufficient.

Found-By: Bradley Sepos <bradley@bradleysepos.com>
CC: libav-stable@libav.org
2026-04-20 19:36:17 +08:00
Vittorio Giovara 444a55a553 Add single precision planar RGB pixel formats
Add a pixel format flag to identify this family.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:36:13 +08:00
openvela-robot 773a310335 avfilter/scale_npp: fix passthrough mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2026-04-20 19:36:12 +08:00
openvela-robot 6b584e3d38 lavc: Add coded bitstream read/write API 2026-04-20 19:36:08 +08:00
Vittorio Giovara 76d2f12168 pixfmt: Support chroma-derived and ictcp color matrices
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:36:05 +08:00
openvela-robot 1c91b8efaf h264: Add support for alternative transfer characterics SEI
The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:36:05 +08:00
Vittorio Giovara 7e8ec2cd61 pixfmt: Support chroma-derived and ictcp color matrices
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:36:03 +08:00
openvela-robot 54e1d567ee h264: Add support for alternative transfer characterics SEI
The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 19:36:02 +08:00
Martin Storsjö 494d1cbb50 d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
If using the winstore compat library, a fallback LoadLibrary
function does exist, that only calls LoadPackagedLibrary though
(which doesn't work for dynamically loading d3d11 DLLs).

Therefore explicitly check the targeted API family instead.

Make this check a reusable HAVE_* component which other parts
of the libraries can check when necessary as well.

Signed-off-by: Martin Storsjö <martin@martin.st>

Merged from Libav commit 4d330da006.
2026-04-20 19:35:59 +08:00
wm4 aab87826bb imgutils: add function to clear an image to black
Black isn't always just memset(ptr, 0, size). Limited YUV in particular
requires relatively non-obvious values, and filling a frame with
repeating 0 bytes is disallowed in some contexts. With component sizes
larger than 8 or packed YUV, this can become relatively complicated. So
having a generic function for this seems helpful.

In order to handle the complex cases in a generic way without destroying
performance, this code attempts to compute a black pixel, and then uses
that value to clear the image data quickly by using a function like
memset.

Common cases like yuv410p10 or rgba can't be handled with a simple
memset, so there is some code to fill memory with 2/4/8 byte patterns.
For the remaining cases, a generic slow fallback is used.

Signed-off-by: Anton Khirnov <anton@khirnov.net>

Merged from Libav commit 45df7adc1d.
2026-04-20 19:35:59 +08:00
wm4 56692caa02 lavc, lavu: move frame cropping to a convenience function
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Merged from Libav commit 47399ccdfd.
2026-04-20 19:35:59 +08:00
Paul B Mahol 17275dfa81 libavutil: add GRAY9 pixel format 2026-04-20 19:35:58 +08:00
openvela-robot 127f49fdc9 avformat/hlsenc: allow dynamic encryption key rotation
Makes behaviour of 805ce25b1d optional, re-enables
HLS key rotation feature

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: DHE <git@dehacked.net>
2026-04-20 19:35:57 +08:00
openvela-robot 6e48113fce hevc: Validate the number of long term reference pictures
This would overflow if the stream contained a value greater than the
maximum allowed by the standard (32).
2026-04-20 19:35:55 +08:00
Yogender Gupta f6f280eb5c hwcontext_cuda : Support YUV444P16 format
Signed-off-by: Philip Langdale <philipl@overt.org>
2026-04-20 19:35:52 +08:00
openvela-robot 55845e9707 avcodec/dirac_vlc: Fix invalid shift
Fixes: runtime error: shift exponent 65 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2737/clusterfuzz-testcase-minimized-4968639147016192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:35:50 +08:00
openvela-robot 9f0224be97 mov: Do not set stsd_count if mov_read_stsd() fails
Based on an FFmpeg patch by Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 19:35:47 +08:00
openvela-robot 3193bb9c8d sws/tests/pixdesc_query: fix use of free() instead of av_free()
Fix CID 1415949
2026-04-20 19:35:44 +08:00