Commit Graph

1252 Commits

Author SHA1 Message Date
openvela-robot 4cc6af2a0e random_seed: Rewrite the generic clock() based seed code
The new code is faster and reuses the previous state in case of
multiple calls.

The previous code could easily end up in near-infinite loops,
if the difference between two clock() calls never was larger than
1.

This makes fate-parseutils finish in finite time when run in wine,
if CryptGenRandom isn't available (which e.g. isn't available if
targeting Windows RT/metro).

Patch originally by Michael Niedermayer but with some modifications
by Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 15:13:56 +08:00
openvela-robot 102e9f1ce9 Merge commit '50079a6aa93291e6dc9d9fb8d33da83f79e9311d'
* commit '50079a6aa93291e6dc9d9fb8d33da83f79e9311d':
  lavc: do not leak the internal frame if opening the codec fails

Conflicts:
	libavcodec/utils.c

See: 8b285f03f7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:13:45 +08:00
openvela-robot e8580eeebc Merge commit '8058284ce09030b47512746d726fb2ad3ae8a20f'
* commit '8058284ce09030b47512746d726fb2ad3ae8a20f':
  lavc: add 422/444 YUV with alpha to align_dimensions()

Conflicts:
	libavcodec/utils.c

Only cosmetical changes happen as these formats already where in the list before

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:13:42 +08:00
openvela-robot 1937b4b65b Merge commit '98c0cd0b99254cd12f312bf6a4c24cd3ec5886b5'
* commit '98c0cd0b99254cd12f312bf6a4c24cd3ec5886b5':
  hevc: add new conformance streams

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:13:21 +08:00
Anton Khirnov 2e22cd76d4 lavc: do not leak the internal frame if opening the codec fails 2026-04-20 15:13:18 +08:00
Anton Khirnov bbc863d01b lavc: add 422/444 YUV with alpha to align_dimensions()
Aligns frame dimensions to 16, which fixes potential invalid writes.
2026-04-20 15:13:18 +08:00
openvela-robot afd74f16ef 4xm: return a proper error code. 2026-04-20 15:13:17 +08:00
openvela-robot 8578302d03 Merge commit '5b4797a21db900b7d509660b7a4d49829089b004'
* commit '5b4797a21db900b7d509660b7a4d49829089b004':
  avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:13:08 +08:00
openvela-robot c419eae610 vp9_parse: don't use AVCodecParserContext as av_log context.
Fixes trac ticket 3273.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:13:05 +08:00
openvela-robot 294f4ac836 cmdutils: update copyright year to 2014.
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 15:13:03 +08:00
openvela-robot 90e7d604c2 avformat/nutdec: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:13:00 +08:00
Tim Walker bfe24d612a avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.
Includes a libavcodec utility function to update a frame's side data.
2026-04-20 15:12:57 +08:00
openvela-robot 76a607033b lavu: Add values for various Dolby flags to the AVMatrixEncoding enum. 2026-04-20 15:12:57 +08:00
openvela-robot 051e88c899 doc/ffserver: mention how to access streams through RTSP 2026-04-20 15:12:15 +08:00
openvela-robot e5256b6985 mpegvideo: set reference/pict_type on generated reference frames
Otherwise the generic code will unref them, which can then result in
last_picture_ptr == current_picture_ptr, which causes deadlocks at least
in rv40.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2026-04-20 15:12:11 +08:00
openvela-robot 4914392958 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavc/mjpegenc: use proper error codes.
  lavc/mjpegenc: check av_frame_alloc() failure.
  lavc/libopenjpegenc: check av_frame_alloc() failure.
  lavc/diracdec: check av_frame_alloc() failure.
  lavc/utils: check av_frame_alloc() failure.
  ffprobe: check av_frame_alloc() failure.
  lavc/ffwavesynth: fix dependency sizeof(AVFrame).

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:12:05 +08:00
openvela-robot dddc465f15 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavu: Move preprocessor macros in a separate file

Conflicts:
	libavutil/avutil.h
	libavutil/utils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:12:04 +08:00
Nicolas George 5c4df34264 lavc/utils: check av_frame_alloc() failure. 2026-04-20 15:12:02 +08:00
openvela-robot 2a93a7c79d Allow hiding the banner.
Fixes ticket #3246.
2026-04-20 15:11:59 +08:00
openvela-robot f0b6473e9a lavu: Move preprocessor macros in a separate file
And remove all the circular inclusions of avutil.h while at it.
2026-04-20 15:11:57 +08:00
openvela-robot 74e51ce7dc Merge commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0'
* commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0':
  avutil: Move library version related macros to version.h

Conflicts:
	libavcodec/version.h
	libavresample/version.h
	libavutil/avutil.h
	libavutil/utils.c

See: 183117fed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:11:44 +08:00
openvela-robot 496cba877c avutil: Move library version related macros to version.h
This is a more sensible place for these macros.
2026-04-20 15:11:41 +08:00
openvela-robot b336a1552c avcodec/vmdav: return the amount of data that has been unpacked from lz_unpack() (as well as errors)
and setup the bytestream buffer size accordingly

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fdcc513cd45_229_12.vmd
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:11:31 +08:00
openvela-robot 2bb7758e9d error.h: Do not circularly depend on avutil.h 2026-04-20 15:11:28 +08:00
openvela-robot a5de5dae3d Merge commit '6c0e83511705e7f8f5100e7852a1e7fd16aa8877'
* commit '6c0e83511705e7f8f5100e7852a1e7fd16aa8877':
  doc: fix a coding style error in the developer documentation.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:11:22 +08:00
Michael Niedermayer 5e2df7bcc1 avcodec/utils: fix memleak on avcodec_open2() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:11:20 +08:00
openvela-robot 2f85008fcd lavu: fix typo in documentation. 2026-04-20 15:11:14 +08:00
Michael Niedermayer 30f1f655c0 configure: support raising major version in soname
this allows seperate installation of shared libs that should not conflict with
whatever is already installed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:11:03 +08:00
openvela-robot a50620800e nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd
This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197

An alternative would be to fail hard in this case and refuse to mux such data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:11:02 +08:00
openvela-robot b1f026f0b7 vc1: Fix intensity compensation performance regression
Introduced by 28243b0d35

Intensity compensation is always used once it was encountered, because
v->next_use_ic is never set back to zero.

Reset v->next_use_ic, when resetting v->next_luty/uv.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 15:11:00 +08:00
openvela-robot c0cc917938 Merge commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b'
* commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b':
  Add a libwebp encoder

Conflicts:
	Changelog
	doc/encoders.texi
	doc/general.texi
	libavcodec/version.h
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:10:56 +08:00
openvela-robot 0c1e62781d hevc: move DSP declarations from hevc.h into hevcdsp.h
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 15:10:54 +08:00
openvela-robot 13494b176c avformat/isom: check avio_read() result
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f7aa4151661_4885_dmbts3.ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:10:51 +08:00
openvela-robot cba5fa0f62 Add a libwebp encoder 2026-04-20 15:10:48 +08:00
openvela-robot 66b0d6db8c Merge commit '832e19063209a5f355af733d1a45f5051f49ce33'
* commit '832e19063209a5f355af733d1a45f5051f49ce33':
  vc1: arm: Add NEON assembly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:10:32 +08:00
openvela-robot 22d81d3f14 lavc: add HEVC profiles names
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 15:10:29 +08:00
openvela-robot 7b20b5b114 avformat/nistspheredec: initialize header_size to -1
Fixes use of uninitialized memory
This also avoids the need to check the scanf() return as the subsequent check catches it
Fixes: msan_uninit-mem_7f712e4dc173_7414_nist_ulaw.nist
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:10:26 +08:00
openvela-robot a3c7bf6049 x86: mpegvideo: move denoise_dct asm to mpegvideoenc
This function is encoding-only.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 15:10:24 +08:00
openvela-robot d8cf33260a avformat/nistspheredec: check sscanf() success before using the result
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f935c3c6c1a_7413_nist_pcms8.nist
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:10:19 +08:00
openvela-robot f2930b3df1 configure: Express atomics/thread deps through the dependency system 2026-04-20 15:10:17 +08:00
openvela-robot 9e35eb8b22 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Explicitly specify the pixel format for the pngparser test

Conflicts:
	tests/fate/image.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:10:07 +08:00
openvela-robot 087d15d3bf fate: Explicitly specify the pixel format for the pngparser test
The RGB32 pixel format is RGBA/BGRA depending on target
endianness - make sure to convert it to one specific format for
the framecrc tests.

This fixes the pngparser fate test on big endian.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 15:09:58 +08:00
openvela-robot 2150904138 avcodec/dirac_dwt: initialize support value for fidelity wavelet
Avoids use of uninitialized memory
Fixes: msan_uninit-mem_7f15e1988a6e_2748_RL_420p_ffdirac.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:09:54 +08:00
openvela-robot 31da09101f Prepare release notes for Libav 10 "Eks"
Additional editing by Diego Biurrun
2026-04-20 15:09:52 +08:00
openvela-robot 1a15786eaa Merge commit 'd8fd183683b7495566b7e510a6536ae2efe8dfed'
* commit 'd8fd183683b7495566b7e510a6536ae2efe8dfed':
  vc1: Fix mb_height for field pictures

See: 017e234c20
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:09:48 +08:00
openvela-robot 6df9458d97 png_parser: Fix parsing on big endian
Since pc.state is populated by shifting in from the end of the
32 bit word, the content within pc.state is already in native endian
and should not be read with the AV_R{L,B} functions.

This was already done correctly for state64 above.

This fixes the fate-corepng test on big endian.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 15:09:46 +08:00
openvela-robot 5121222b42 Revert "Merge commit '3bc2e89c76e88ae6f1fd5287e0b11abcfc3c601c'" (Bump libavutil major version to account for the LLS API/ABI changes.)
This reverts commit 792845e436, reversing
changes made to 1d6666a6b8.

Bumping libavutil requires all libraries that use libavutil to have their
major version bumped (yes breakage has been confirmed this is not a hypotheses)

One case of breakage is due to new types being added to AVOptions and
applications that linked to old libavutil and libswresample
then trying to use old libavutil (its soname changed so the old isnt updated)
and new swresample (its soame didnt change so it is updated)
the new swresample contains AVOption types that the old libavutil doesnt
know of thus the application attempting to access these avoptions
fails

AVOptions are used by all libs so the issue can potentially happen with
any other lib, libswresample was just the first that showed the problem
ive not checked if the other libs are affected currently by the same issue
or not

Also in addition to AVOptions, AVFrames are also defined in
libavutil, bumping it without all libs that use AVFrames could lead to
serious inconsistencies when 2 libs/app end up using 2 different libavutils

The alternative of bumping all is still possible after this revert, if it
turns out to be the preferred solution
2026-04-20 15:09:43 +08:00
openvela-robot b2675dccfa vc1: Fix mb_height for field pictures
Tables are always allocated now with sufficient space for either progressive
or interlaced content. The alternative would be to detect a change
and reallocate.

This fixes decoding of a sample.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 15:09:41 +08:00
Michael Niedermayer 2ea71b8b27 avcodec/utils: drop 2 dependancies on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:09:32 +08:00
Michael Niedermayer b4c67b9ede avcodec/utils: implement avcodec_alloc_frame() through av_alloc_frame()
This ensures that theres just one AVFrame allocation function and libs dont
produce multiple AVFrame variants after a minor lib update

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2026-04-20 15:09:32 +08:00