Commit Graph

2356 Commits

Author SHA1 Message Date
openvela-robot d7d6c84ff9 vp9dsp: add DC only versions for idct/idct.
before:

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m11.125s
user    0m11.059s
sys     0m0.050s

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m10.944s
user    0m10.819s
sys     0m0.064s

after:

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m8.153s
user    0m8.034s
sys     0m0.050s

time ./avconv -v 0 -nostats -threads 1 -i sintel_vp9_500kbps.webm -f null -
real    0m8.038s
user    0m7.980s
sys     0m0.039s

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:58:05 +08:00
openvela-robot edf66e5e14 mov: Evaluate the movie display matrix
This matrix needs to be applied after all others have (currently only
display matrix from trak), but cannot be handled in movie box, since
streams are not allocated yet. So store it in main context, and apply
it when appropriate, that is after parsing the tkhd one.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:58:02 +08:00
openvela-robot 2fb023537e metasound: Drop unused tables 2026-04-20 18:57:59 +08:00
openvela-robot d83697d3e4 tests/ffserver-regression.sh: give wget a timeout and prevent retries
Reviewed-by: "Reynaldo H. Verdejo Pinochet" <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:57:55 +08:00
openvela-robot 4a532ab6d5 configure: Integrate X11 checks into vaapi/vdpau checks 2026-04-20 18:57:52 +08:00
openvela-robot c204beec53 avfilter/vf_bitplanenoise: add gray10 and gray12 suppport
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:57:49 +08:00
openvela-robot 6f49457c22 configure: Move hardware-accelerated codec deps out of hwaccel section 2026-04-20 18:57:46 +08:00
openvela-robot e3bf403dee avfilter/vf_extractplanes: add extract support for 10bit and 12bit formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:57:43 +08:00
openvela-robot b55dde48c7 avisynth: Cast to the right type when loading avisynth library functions
Fixes a number of related warnings.
2026-04-20 18:57:41 +08:00
openvela-robot f760ec2335 avcodec/msrledec: implement vertical offset in 4-bit RLE
The delta escape (2) is supposed to work the same in 4-bit RLE as in
8-bit RLE.  This is documented in the MSDN Bitmap Compression page:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd183383(v=vs.85).aspx

The unchecked modification of line is safe, since the loop condition
(line >= 0) will check it before any pixel data is written.

Fixes ticket #5153 (output now matches ImageMagick for the provided sample).

Signed-off-by: Daniel Verkamp <daniel@drv.nu>
2026-04-20 18:57:26 +08:00
openvela-robot 2da9f170b2 avconv: Fix the audio next dts computation
Use the correct timebase.

CC: libav-stable@libav.org
2026-04-20 18:57:23 +08:00
openvela-robot e7de506b2a vf_colorspace: Forbid odd dimensions
This prevents writing past bounds.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:57:19 +08:00
openvela-robot acb7f3015a ac3enc: Reshuffle functions to avoid forward declarations 2026-04-20 18:57:16 +08:00
openvela-robot b7ba0fcd02 swresample/soxr: fix invalid use of linear_interp
give very bad quality for soxr resampler.
linear_interp is intended for  using linear interpolation
between filter bank so quality will be better.

i guess this is misunderstood as 'do not use filter bank,
but directly interpolate linearly between samples'.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 18:57:12 +08:00
openvela-robot 962aaa0d6f tta: use get_unary() instead of a custom implementation
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:57:09 +08:00
openvela-robot 60d37ffd56 avcodec/nvenc: Remove aspect-ratio decompensation logic
This dubious behaviour in nvenc was finally removed by nvidia, and
as we refuse to run on anything older than 7.0, we don't need to
keep it around for old versions.
2026-04-20 18:57:06 +08:00
openvela-robot 0745a62169 configure: Use correct variable name in libsnappy test 2026-04-20 18:57:03 +08:00
openvela-robot 74815e7fee ffmpeg_filter: fix several logic failures
Move global thread variables to better place.
Use correct variable for simple and complex filtergraphs.

This makes number of threads set per filter work again.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:56:59 +08:00
openvela-robot c98babce59 ra144: Convert to the new bitstream reader 2026-04-20 18:56:55 +08:00
openvela-robot fc60a5657d lavfi/pan: allow negative gain parameters also for other inputs than the first named
Expands the parser to also accept the separator '-' in addition to
'+', and take the negative sign into consideration.

The optional sign for the first factor in the expression is already
covered by parsing for an integer.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:56:52 +08:00
openvela-robot 0d81a3880d Revert "checkasm: vp9dsp: Benchmark the dc-only version of idct_idct separately"
This reverts commit 81d7f0bbca.

Instead of just benchmarking dc separately, test all relevant subparts
(in the next commit).

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:56:49 +08:00
openvela-robot 85e7661956 avfilter/vf_zscale: add support for some recent new additions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:56:36 +08:00
openvela-robot c3dc5c41e3 dvbsub: cosmetics: Group all debug code together 2026-04-20 18:56:29 +08:00
openvela-robot 77988712ef Merge commit '8d07e941b04d63fc4443dd986e3dc7b69cdcca43'
* commit '8d07e941b04d63fc4443dd986e3dc7b69cdcca43':
  FATE: add a test of H.264 SEI recovery in an intra refresh stream

Our H264 decoder drops 3 frames from the beginning of the stream, but
all frames after those match, hence the difference in the fate test.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2026-04-20 18:56:20 +08:00
openvela-robot 638fd3be77 hlsenc: Fix the openssl support 2026-04-20 18:56:18 +08:00
openvela-robot 60c42ebf3e Merge commit '61cb9fac47498a38dfe7623f66aa1f3696e9158c'
* commit '61cb9fac47498a38dfe7623f66aa1f3696e9158c':
  mov: fix stream extradata_size allocation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2026-04-20 18:56:09 +08:00
openvela-robot 39b04a73fc hwcontext_dxva2: do not assume the destination format during mapping is always the right one
Handle the cases where it is unsupported or unset.
2026-04-20 18:56:04 +08:00
openvela-robot 9412502201 ffprobe: fix crash in case -of is specified with an empty string
Fix trac issue #5957.
2026-04-20 18:55:59 +08:00
openvela-robot 421cf359a7 crypto: Add encryption support
Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:55:56 +08:00
openvela-robot a06bc76a63 avcodec/ass_split: Change order of operations in ass_split_section()
This matches the other branch
Fixes out of array read
Fixes: 4d142ca76d39fe685effcf5017098723/asan_heap-oob_31ae824_8611_348fdb64f9009b63c8a8eae9a0e497c5.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:55:53 +08:00
openvela-robot 73b065d599 examples/transcode_aac: Drop pointless return value const qualifier
doc/examples/transcode_aac.c:52:20: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
2026-04-20 18:55:50 +08:00
openvela-robot 6bb345b50c avcodec/mpegvideo: Fix edge emu buffer overlap with interlaced mpeg4
Fixes Ticket5936
Regression since c5fc8ae126

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:55:33 +08:00
openvela-robot 7b5cbb21dd avisynth: Fix setting stream timebase
Stream timebase should be set using avpriv_set_pts_info, otherwise
avctx->pkt_timebase is not correct, leading to A/V desync.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:55:30 +08:00
openvela-robot 208304d01f dds: limit 4 bpp handling to AV_PIX_FMT_PAL8
This fixes NULL pointer dereferencing for formats, where frame->data[1]
is not allocated.

The problem was introduced in commit
257fbc3af4.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:55:26 +08:00
openvela-robot 318cff1679 mov: Fix identity matrix boolean logic
This prevented the code from correctly exporting the rotation matrix
which caused a few samples to be displayed wrong.
Introduced in ecd2ec69ce.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:55:24 +08:00
openvela-robot bc0ab06800 configure: properly add dxva2 link dependencies
Fixes building with --disable-everything --enable-shared --enable-dxva2

The hwcontext DXVA2 implementation in avutil needs this library now, instead
of just the ffmpeg program.
2026-04-20 18:55:21 +08:00
openvela-robot 5fbe1e45e9 configure: Move mjpeg_vaapi_decoder dependency declarations to the right place 2026-04-20 18:55:18 +08:00
openvela-robot e910849325 avcodec/movtextdec: Fix potential integer overflow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:55:13 +08:00
openvela-robot 681bb55ed4 af_asyncts: Use llabs instead of labs for 64-bit variable
libavfilter/af_asyncts.c:212:9: warning: absolute value function 'labs' given an argument of type 'int64_t' (aka 'long long') but has parameter of type 'long' which may cause truncation of value [-Wabsolute-value]
2026-04-20 18:55:11 +08:00
openvela-robot ca4aa57365 softfloat: handle -INT_MAX correctly
This is similar to commit 9ac61e73d0.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:55:08 +08:00
openvela-robot 27b79e1a85 qsvdec: Pass the correct profile to libmfx
This was correct for H.26[45], because libmfx uses the same values
derived from profile_idc and the constraint_set flags, but it is
wrong for other codecs.

Also avoid passing FF_LEVEL_UNKNOWN (-99) as the level, as this is
certainly invalid.
2026-04-20 18:55:04 +08:00
openvela-robot 88694d6048 Merge commit '7c55fac7dfa8bad9644dea5d03309da30be69563'
* commit '7c55fac7dfa8bad9644dea5d03309da30be69563':
  fate: Add test for webp

Noop, we already have a variety of webp tests, including a fate-webp target,
which would collide with this test.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2026-04-20 18:54:20 +08:00
openvela-robot d32cb4c1ff aarch64: vp9: loop_filter: fix typo in skip flatout8 check
The 16_16 loop filter functions could miss an early exit before
flatout8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:54:18 +08:00
openvela-robot 325ca8e460 lavc/dpx: Support GRAY12 colourspace. 2026-04-20 18:54:14 +08:00
openvela-robot 6cf8a03e53 arm: vp9itxfm: Simplify txfm string comparisons
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:54:11 +08:00
openvela-robot 033bdd6e0b filmstripdec: correctly check image dimensions
This prevents a division by zero in read_packet.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:53:55 +08:00
openvela-robot 513293b6c6 avconv_opt: Consistently iterate through hwaccels array in all cases
avconv_opt.c:188:19: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
2026-04-20 18:53:52 +08:00
openvela-robot 1d16774bf2 ffmpeg_qsv: Fix hwaccel transcoding
Set up the encoder with a hardware context which will match the one
the decoder will use when it starts later.

Includes 02c2761973, with additional
hackery to get around a3a0230a98 being
skipped.
2026-04-20 18:53:49 +08:00
openvela-robot 22fdf126a3 aac: Drop pointless cast 2026-04-20 18:53:47 +08:00
openvela-robot feb201c8ec fate: fix fate-api dependencies
No need to run the whole fate-lavf set. fate-lavf-flv_fmt is enough to
create the required source file.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:53:32 +08:00
openvela-robot 7a08df0b45 ratecontrol: Use correct function pointer casts instead of void*
libavcodec/ratecontrol.c:120:9: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
libavcodec/ratecontrol.c:121:9: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
2026-04-20 18:53:29 +08:00
openvela-robot e131189822 lavfi/loudnorm: add an internal libebur128 library
Also contains the following changes to the library:
- add ff_ prefix to functions
- remove cplusplus defines.
- add FF_ prefix to contants and some structs
- remove true peak calculation feature, since it uses its own resampler, and
  af_loudnorm does not need it.
- remove version info and some fprintf(stderr) functions
- convert to use av_malloc
- always use histogram mode for LRA calculation, otherwise LRA data is slowly
  consuming memory making af_loudnorm unfit for 24/7 operation. It also uses a
  BSD style linked list implementation which is probably not available on all
  platforms. So let's just remove the classic mode which not uses histogram.
- add ff_thread_once for calculating static histogram tables
- convert some functions to void which cannot fail
- remove intrinsics and some unused headers
- add support for planar audio
- remove channel / sample rate changer function, in ffmpeg usually we simply
  alloc a new context
- convert some static variables to defines
- declare static histogram variables as aligned
- convert some initalizations to mallocz
- add window size parameter to init function and remove window size setter
  function
- convert return codes to AVERROR
- fix indentation

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 18:53:26 +08:00
openvela-robot eae3ecb444 checkasm: add vp9dsp.itxfm_add tests.
This includes fixes by Henrik Gramner.

The forward transforms are derived from the reference encoder.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:53:23 +08:00
openvela-robot c40d6ceb0c icodec: correctly check avio_read return value
It can read less than the requested amount, in which case buf contains
uninitialized data, causing problems like segmentation faults later on.

Also make sure that image->size is positive, so that it can't match a
negative error code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:53:20 +08:00
openvela-robot 79ad8094ba pthread_frame: Unreference hw_frames_ctx on per-thread codec contexts
When decoding with threads enabled, the get_format callback will be
called with one of the per-thread codec contexts rather than with the
outer context.  If a hwaccel is in use too, this will add a reference
to the hardware frames context on that codec context, which will then
propagate to all of the other per-thread contexts for decoding.  Once
the decoder finishes, however, the per-thread contexts are not freed
normally, so these references leak.
2026-04-20 18:53:17 +08:00
openvela-robot 9fe489b699 avcodec/hap: add "compressor" option to Hap encoder to disable secondary compression
The secondary compression in Hap is optional, this change exposes that option to
the user as some use-cases favour higher bitrate files to reduce workload
decoding.
Adds "none" or "snappy" as options for "compressor". Selecting "none" disregards
"chunks" option: chunking is only of benefit decompressing Snappy.

Reviewed-by: Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: Tom Butterworth <bangnoise@gmail.com>
2026-04-20 18:53:13 +08:00
openvela-robot a6d1c2f857 matroskaenc: fix muxing AAC streams when using aac_adtstoasc bsf
aac_adtstoasc makes the aac extradata available only after the first packet
is filtered, and as packet side data.

Assume extradata will be available as part of the first packet if
avpriv_mpeg4audio_get_config() fails the first time due to missing extradata
and reserve space for the OutputSampleRate element in the Tracks master.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:53:10 +08:00
openvela-robot e22bab134f icodec: fix leaking pkt on error
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:53:06 +08:00
openvela-robot 33a542b8d5 avconv: Drop stray leftover debug output 2026-04-20 18:53:03 +08:00
openvela-robot fde5a04d96 matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header
The code assumes that s->streams[0] is valid.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:52:49 +08:00
openvela-robot a10e935898 Use avpriv_report_missing_feature() where appropriate 2026-04-20 18:52:46 +08:00
openvela-robot 9498f05852 avformat/matroskadec: fix DiscardPadding element parsing
If the value is negative then it means padding at the start of the packet
instead of at the end.

Based on a patch by Hendrik Leppkes.

Reviewed-by: James Zern <jzern-at-google.com@ffmpeg.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:52:43 +08:00
openvela-robot c52d6dc927 avconv: Correct function pointer assignments in options array
Fixes several warnings of the type
avconv_opt.c:2356:5: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
2026-04-20 18:52:40 +08:00
openvela-robot 3b3290474c aacenc: quit when the audio queue reaches 0 rather than keeping track of empty frames
The libopus encoder does the same thing and its better than
keeping track of when the empty flush frames appear.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 18:52:36 +08:00
openvela-robot 0296b29b42 pixfmt: Add GRAY12 2026-04-20 18:52:33 +08:00
openvela-robot 1f71b5ffee avformat/hls: Factor copying stream info to a separate function
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2026-04-20 18:52:29 +08:00
openvela-robot f888bfd681 libx265: Add option to force IDR frames
This is in the same the same vein as 380146924e.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:52:26 +08:00
openvela-robot cb25227fc5 fate: Remove show_formats for fate-mov-zombie test
This includes the absolute path

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:52:21 +08:00
openvela-robot a3e0dadcda x86: Drop stray semicolons after function definitions
libavcodec/x86/rv40dsp_init.c:97:2: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
libavcodec/x86/vp9dsp_init.c:94:40: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
2026-04-20 18:52:18 +08:00
openvela-robot a22f3840be avformat/mux: split side data earlier in av_write_frame and av_interleaved_write_frame
Similarly, merge it back before returning.

Fixes ticket #5927.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:52:14 +08:00
openvela-robot 6be5c9c026 arm: vp9mc: Insert a literal pool at the middle of the file
This fixes errors like this when building non-pic binaries with armv6
as baseline:

Error: invalid literal constant: pool needs to be closer

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:52:12 +08:00
openvela-robot ea62a40052 libx265: Add option to force IDR frames
This is in the same the same vein as c981b1145a.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:52:08 +08:00
openvela-robot 84f104490f hwcontext: Hardware frame mapping
Adds the new av_hwframe_map() function, which allows mapping between
hardware frames and normal memory, along with internal support for
implementing it.

Also adds av_hwframe_ctx_create_derived(), for creating a hardware
frames context associated with one device using frames mapped from
another by some hardware-specific means.
2026-04-20 18:52:05 +08:00
openvela-robot da5687e971 ffmpeg: Fix bsf corrupting merged side data
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:52:02 +08:00
openvela-robot 11efdd0c19 Drop unreachable break and return statements 2026-04-20 18:51:59 +08:00
openvela-robot e8021bb37b lavf/mov.c: Use the first sidx for tracks without sidx.
According to spec ISO_IEC_15444_12 "For any media stream for which no segment index is present, referred to as non‐indexed stream, the media stream associated with the first Segment Index box in the segment serves as a reference stream in a sense that it also describes the subsegments for any non‐indexed media stream."

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:51:56 +08:00
openvela-robot aa72c18aaf ituh263dec: Have function signature match across declaration and definition
libavcodec/ituh263dec.c(215) : warning C4028: formal parameter 1 different from declaration
libavcodec/ituh263dec.c(215) : warning C4028: formal parameter 2 different from declaration
2026-04-20 18:51:53 +08:00
openvela-robot da657fb59f Merge commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0'
* commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0':
  avconv: decouple configuring filtergraphs and setting input parameters

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2026-04-20 18:51:50 +08:00
openvela-robot 90cef094d0 vp9: Flip the order of arguments in MC functions
This makes it match the pattern already used for VP8 MC functions.

This also makes the signature match ffmpeg's version of these
functions, easing porting of code in both directions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:51:48 +08:00
openvela-robot a07ad59d8b crystalhd: Fix up the missing first sample
Why on earth the hardware returns garbage for the first sample of
a decoded picture is anyone's guess. The simplest reasonable way
to patch it up is to copy the first sample of the second line. This
should result in the correct chroma values (because the data was
original 4:2:0 upsampled to 4:2:2) even if the luma is isn't.
2026-04-20 18:51:44 +08:00
openvela-robot eaeaf20666 lavfi: Always propagate hw_frames_ctx through links
Also adds a new flag to mark filters which are aware of hwframes and
will perform this task themselves, and marks all appropriate filters
with this flag.

This is required to allow software-mapped hardware frames to work,
because we need to have the frames context available for any later
mapping operation in the filter graph.

The output from the filter graph should only propagate further to an
encoder if the hardware format actually matches the visible format
(mapped frames are valid here and have an hw_frames_ctx, but this
should not be given to the encoder as its hardware context).
2026-04-20 18:51:41 +08:00
openvela-robot a09f62cf5c avformat/matroskaenc: use display aspect ratio for DisplayWidth and DisplayHeight when possible
This avoids potential rounding errors and guarantees the source aspect
ratio is preserved.
Keep writing pixel values when Stereo 3D Mode is enabled and for WebM,
as the format doesn't support anything else.

This fixes ticket #5743, implementing the suggestion from ticket #5903.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:51:38 +08:00
openvela-robot 6325686550 lavfi: Make default get_video_buffer work with hardware frames 2026-04-20 18:51:35 +08:00
openvela-robot 05102e8b86 lavc: Add hevc main10 profile to ffmpeg cli
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:51:32 +08:00
openvela-robot 59c2c18c6d avconv: support parsing bitstream filter options
Example usage:

avconv -i INPUT -bsf filter[=opt1=val1:opt2=val2] OUTPUT

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:51:28 +08:00
openvela-robot 6fe5ea9db2 Fix build warnings due to misleading indentation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:51:24 +08:00
openvela-robot 64bb881ba2 mov: Evaluate the movie display matrix
This matrix needs to be applied after all others have (currently only
display matrix from trak), but cannot be handled in movie box, since
streams are not allocated yet. So store it in main context, and apply
it when appropriate, that is after parsing the tkhd one.

Fate tests are updated accordingly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:51:22 +08:00
openvela-robot 00b4f354e6 fate filter metadata : add test for aphasemeter - Test a mono file (in phase) -> 1. as result - Test a out of phase 1000 Hz -> -1. as result
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:51:19 +08:00
openvela-robot c8a7852dee avprobe: Add -show_stream_entry to get a single stream property
This is needed for improved fate testing and it is modeled after
-show_format_entry. The main behavioral difference is that when a print
function is called with an empty key, rather than discarding it, the
closes key in the hierarchy is used instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:51:16 +08:00
openvela-robot b3b6620a63 vf_colorspace: Add support for iec61966-2.4 (xvYCC) transfer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:51:02 +08:00
openvela-robot 4bd2e66851 openssl: Allow newer TLS versions than TLSv1
The use of TLSv1_*_method() disallows newer protocol versions; instead
use SSLv23_*_method() and then explicitly disable the deprecated
protocol versions which should not be supported.
2026-04-20 18:50:59 +08:00
openvela-robot 04f5bfcaa6 interplayacm: check for too large b
This fixes out-of-bounds reads.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:50:54 +08:00
openvela-robot 607234b619 qsv: Be informative when reporting that no data has been consumed 2026-04-20 18:50:52 +08:00
openvela-robot ac6c5e968f configure: add missing fork() dependency to http_multiclient example
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:50:48 +08:00
openvela-robot f5d769a120 Use avpriv_request_sample() where appropriate 2026-04-20 18:50:45 +08:00
openvela-robot ba0f4c72a1 configure: make sure LTO does not optimize out the test functions
Fixes trac ticket #5909

Bud-Id: https://bugs.gentoo.org/show_bug.cgi?id=598054
Acked-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:50:42 +08:00
openvela-robot 2b62d610fa Use ISO C printf conversion specifiers where appropriate 2026-04-20 18:50:40 +08:00
openvela-robot 8c6be1639c avformat/flvdec: Fix regression loosing streams
Fixes: unknown_video.flv

Found-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:50:37 +08:00
openvela-robot f35d7102d2 Adjust printf conversion specifiers to match variable signedness 2026-04-20 18:50:34 +08:00
openvela-robot ce942ffc93 apng: use side data to pass extradata to muxer
This fixes creating apng files, which is broken since commit
5ef1959080.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:50:31 +08:00
openvela-robot b1fc8a1966 build: Hardcode avversion.h dependency
Since avversion.h is a generated header it must be created before
dependencies can be determined as a side effect of compilation.
Otherwise Make stops and restarts the build process to generate
avversion.h and produces related error messages.
2026-04-20 18:50:28 +08:00
openvela-robot 972285fe47 avfilter/scale_npp: fix passthrough mode
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:50:23 +08:00
openvela-robot 8e6954580c openssl: Avoid double semicolons after the GET_BIO_DATA macro
When the macro is expanded with a semicolon following it and the
macro itself contains a semicolon, we ended up in double semicolons,
which is treated as a statement that disallows further declarations.

This avoids errors about mixed declarations and statements on gcc,
after ee05079766.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:50:21 +08:00
openvela-robot 31dd59d2bc vp9: change order of operations in adapt_prob().
This is intended to workaround bug "665 Integer Divide Instruction May
Cause Unpredictable Behavior" on some early AMD CPUs, which causes a
div-by-zero in this codepath, such as reported in Mozilla bug #1293996.

Note that this isn't guaranteed to fix the bug, since a compiler is free
to reorder instructions that don't depend on each other. However, it
appears to fix the bug in Firefox, and a similar patch was applied to
libvpx also (see Chrome bug #599899).
2026-04-20 18:50:17 +08:00
openvela-robot a0645837ae vaapi_decode: Clear parameter buffers to fix picture reuse
When decoding interlaced pictures, the structure is reused to render
to the same surface twice.  The parameter buffers were not being
cleared, which caused the i965 driver to error out.
2026-04-20 18:50:14 +08:00
openvela-robot 998f75e0d6 lavc/parser: export field order if not already set
Some codecs set this in the parser, but not the decoder
2026-04-20 18:50:10 +08:00
openvela-robot 00368e9689 openssl: Support version 1.1.0.
Further simplifications by Martin Storsjö, to minimize the
diff.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:50:07 +08:00
openvela-robot f96c2af00d mpegts: handle AVMEDIA_TYPE_UNKNOWN correctly
It is negative, so can't be used for left shifting.

This fixes ubsan runtime error: shift exponent -1 is negative

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:50:04 +08:00
openvela-robot fcb94edf7c Replace leftover uses of -aframes|-dframes|-vframes with -frames:a|d|v 2026-04-20 18:50:01 +08:00
openvela-robot 1e336a20cd doc: fix spelling errors
Thanks to Mathieu Malaterre <malat@debian.org> for reporting the
Que/Queue typo. (https://bugs.debian.org/839542)

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:49:57 +08:00
openvela-robot 89e750047f mov: Update colr values
For 'nclx', the latest edition of the standard switched from JPEG XR
to 23001-8, which matches the current order of our entries. Bounds
are preserved as a sanity check.

For 'nclc', qtff edition 2016-09-13 introduced a few new entries.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:49:55 +08:00
openvela-robot 2264341d34 dcstr: fix division by zero
Also check for possible overflows.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2026-04-20 18:49:51 +08:00
openvela-robot 8a7cb5d463 lavu: Add JEDEC P22 color primaries 2026-04-20 18:49:48 +08:00
openvela-robot a8cce89cbf avcodec/dnxhdenc: Move allocation out of radix_sort()
Its slow, its not checked, FPU state is not clean either currently there

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:49:45 +08:00
openvela-robot 67adc5f5c3 lavf: check that the codec is supported by extract_extradata
Avoids superfluous error message spam after
8e2ea69135
2026-04-20 18:49:42 +08:00
openvela-robot 35b7b55f25 lavf/riff: Document the interleaving of VSM4 video. 2026-04-20 18:49:38 +08:00
openvela-robot e2d739c994 audiodsp: x86: Remove pointless header file
Its single forward declaration can be moved to the only place
it is used, like is done for all other dsp init files.
2026-04-20 18:49:36 +08:00
openvela-robot 34ebe80bc9 lavc: add vp8/vp9 mediacodec decoders 2026-04-20 18:49:31 +08:00
openvela-robot 45b4ed12c4 configure: Print warnings after all other output 2026-04-20 18:49:22 +08:00
openvela-robot 22597116ca aacenc: add SIMD optimizations for abs_pow34 and quantization
Performance improvements:

quant_bands:
with:     681 decicycles in quant_bands, 8388453 runs,    155 skips
without: 1190 decicycles in quant_bands, 8388386 runs,    222 skips
Around 42% for the function

Twoloop coder:

abs_pow34:
with/without: 7.82s/8.17s
Around 4% for the entire encoder

Both:
with/without: 7.15s/8.17s
Around 12% for the entire encoder

Fast coder:

abs_pow34:
with/without: 3.40s/3.77s
Around 10% for the entire encoder

Both:
with/without: 3.02s/3.77s
Around 20% faster for the entire encoder

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: James Almer <jamrial@gmail.com>
2026-04-20 18:49:16 +08:00
openvela-robot aa9822a26a fate: Update filter-pixfmts-scale gbrap12le hash missing from be9dba5c8a
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:49:14 +08:00
openvela-robot c3d80b389e avcodec/mediacodec: Factor duplicate include
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:49:10 +08:00
openvela-robot cd1b7c1d4e checkasm: aarch64: Don't clobber x29 in checkasm_stack_clobber
x29 (FP) is a callee saved register and should be restored on
return. Instead of backing up x29 and restoring it here, back up
sp in a register that we are allowed to overwrite.

This fixes crashes in checkasm on aarch64 since f1b3e13138.
For some reason, gcc builds didn't crash, but clang builds do.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:49:08 +08:00
openvela-robot bb53e3b4e1 doc/examples/demuxing_decoding: Drop AVFrame->pts use
This code is not correct for git master

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:49:05 +08:00
openvela-robot 8ff4906500 swscale: Properly load alpha for planar rgb
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:49:02 +08:00
openvela-robot d977818fd8 fate: add swr-convertaudio test
test for flt to s16
should pass on correct rounding to nearest

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 18:48:59 +08:00
openvela-robot 5e220701d0 vaapi_encode: Write sequence header as extradata
Only works if packed headers are supported, where we can know the
output before generating the first frame.
2026-04-20 18:48:56 +08:00
openvela-robot bd546be121 lavc/videotoolboxenc: Enable a53cc by default. 2026-04-20 18:48:53 +08:00
openvela-robot 50e1feb73c build: Drop duplicate asm recipe
And move the asm recipe to the top-level Makefile next to the other
local pattern rules for .o files.
2026-04-20 18:48:50 +08:00
openvela-robot a14615044e mov: move stsd finalization to an appropriate place
mov_finalize_stsd_codec parses stream information from the ALAC extradata,
so run it after the extradata processing is completed in mov_read_stsd.

Fixes playback of 96kHz ALAC streams muxed by qaac or the reference alac encoder.
Fixes trac ticket #5826
2026-04-20 18:48:47 +08:00
openvela-robot 13199eb918 checkasm: arm/aarch64: Fix the amount of space reserved for stack parameters
Even if MAX_ARGS - 2 (for arm) or MAX_ARGS - 7 (for aarch64) parameters
are passed on the stack to checkasm_checked_call, we actually only
need to store MAX_ARGS - 4 (for arm) or MAX_ARGS - 8 (for aarch64)
parameters on the stack when calling the tested function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:48:44 +08:00
openvela-robot b921b9ebc8 avfilter/firequalizer: add scale option
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 18:48:41 +08:00
openvela-robot d5ff859bd0 hevc: rename hevc.[ch] to hevcdec.[ch]
This is more consistent with the rest of libav and frees up the hevc.h
name for decoder-independent shared declarations.
2026-04-20 18:48:38 +08:00
openvela-robot 694ddbf2f4 Partially revert "avformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are in pixels"
The code works just fine regardless of unit, so only make sure DisplayUnit
is not "unknown".

Found-by: Nicolas George <george@nsup.org>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:48:35 +08:00
openvela-robot 1669d88cfd file protocol: handle the file: protocol string in file_check
This is consistent with what file_open() does.

CC: libav-stable@libav.org
2026-04-20 18:48:32 +08:00
openvela-robot d2f1758a22 avutil: Improved selftest coverage for libavutil/fifo.c
Tested functions: av_fifo_generic_peek(), av_fifo_grow()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:48:29 +08:00
openvela-robot 67f1ef1dca Make the RELEASE file match with the most recent tag 2026-04-20 18:48:26 +08:00
openvela-robot 367e078fae avformat: bump minor version after the Matroska field order enum fix
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:48:22 +08:00
openvela-robot 556fea0e1c Add GBRAP12 pixel format support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:48:19 +08:00
openvela-robot edcf6e4908 avcodec/nvenc: add support for forcing intra/idr frames 2026-04-20 18:48:16 +08:00
openvela-robot c095fc8cd1 APIchanges: Expand the name of recently added pixel formats
This makes them easier to search for.
2026-04-20 18:48:14 +08:00
openvela-robot 95e09dc767 aacenc: use the decoder's lcg PRNG
Using lfg was an overkill in this case where the random numbers
were only used for encoder descisions. Should increase result
uniformity between different FPUs and gives a slight speedup.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 18:48:10 +08:00
openvela-robot 0059425493 swscale: Add missing yuv444p12 swapping
Missing from 9bd6ea5695.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:48:08 +08:00
openvela-robot 5f4471f32a avformat/matroskaenc: don't write a FlagInterlaced element if it would write the default value
The spec says:
"Mandatory elements with a default value may be left out of the file. In the absence
of a mandatory element, the element's default value is used."

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:48:05 +08:00
openvela-robot 5a242ee5da checkasm: add a test for HEVC IDCT
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:48:02 +08:00
openvela-robot fb98983c9d avfilter/firequalizer: fix blackman window calculation
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 18:47:58 +08:00
openvela-robot b95615d73b nvenc: Fix error log
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:47:55 +08:00
openvela-robot f95df8ddac ffmpeg: remove unused and errorneous AVFrame timestamp check
Decoders have previously not used AVFrame.pts, and with the upcoming
deprecation of pkt_pts (in favor of pts), this would lead to an errorneous
interpration of timestamps.
2026-04-20 18:47:37 +08:00
openvela-robot 965979bdb1 nvenc: Force high_444 profile for 444 input
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:47:34 +08:00
openvela-robot c327c02bbf lavc/mediacodecdec: fix size variable shadowing in ff_mediacodec_dec_decode
Fixes incompatible pointer type warning on 64-bit systems.
2026-04-20 18:47:30 +08:00
openvela-robot 3ad4377cb1 Revert "hevc: x86: Refactor IDCT macro declarations"
This reverts commit d9dccc0389. There were
outstanding objections to this commit.
2026-04-20 18:47:27 +08:00
openvela-robot 92b9c497a7 avcodec/qsvenc_h264: fix segfault when a53 SEI is not available
Signed-off-by: Nablet Developer <sdk@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:47:22 +08:00
openvela-robot 5e952bc649 hevc: x86: Refactor IDCT macro declarations 2026-04-20 18:47:11 +08:00
openvela-robot cb3b8f644b af_hdcd: add mono as a supported channel layout
Signed-off-by: Burt P <pburt0@gmail.com>
2026-04-20 18:47:08 +08:00
openvela-robot a80fffe3cc d3d11va: Use the proper decoding slice index
The decoding buffer index expected by D3D11VA is the one from the
ID3D11Texture2D not the one from the ID3D11VideoDecoderOutputView array
in AVD3D11VAContext.

Otherwise, when providing decoder slices that do not start from 0,
pictures appear in bogus order. For an invalid index crashes and
image corruption can occur.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:47:05 +08:00
openvela-robot ba07d0e3c5 avcodec/cuvid: don't align frame size
hwcontext_cuda was changed to take care of proper alignment internally
2026-04-20 18:47:01 +08:00
openvela-robot 6640fe6050 vp9: ignore reference segmentation map if error_resilience flag is set.
Fixes ffvp9_fails_where_libvpx.succeeds.webm.

Bug-Id: ffmpeg/3849.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:46:57 +08:00
openvela-robot 253617aeff doc/t2h: use container
Full width text is really difficult to read, this makes it more
more legible on larger (widescreen) screens. It also means we aren't
inventing our own container instead of using the bootstrap one.

Signed-off-by: Josh de Kock <josh@itanimul.li>
2026-04-20 18:46:53 +08:00
openvela-robot a6478f70e2 configure: check for stdatomic.h
Since this is a C11 feature, it requires -std=c11.

Not actually used for anything yet, that will be added in the following
commits.
2026-04-20 18:46:49 +08:00
openvela-robot f10ca0c0d0 configure: define posix source on cygwin
Some function definitions are missing without it,
for example sigaction.

Fixes ticket #5868
2026-04-20 18:46:46 +08:00
openvela-robot 5987607749 checkasm: Add test for huffyuvdsp add_bytes
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:46:43 +08:00
openvela-robot 0f2b047353 ffplay: use decoder avctx for decoded subtitle width/height
Fixes ticket #5873.

Reviewed-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 18:46:40 +08:00
openvela-robot 36f449cba6 hwcontext_vaapi: add a quirk for the missing MemoryType attribute
The Intel binary iHD driver does not support the
VASurfaceAttribMemoryType, so surface allocation will fail when using
it.
2026-04-20 18:46:37 +08:00
openvela-robot 959fcf8bdf fate: Add fate-svq3-watermark
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:46:30 +08:00
openvela-robot 6f52df4669 ac3dsp: Reverse matrix in/out order in downmix()
Also use (float **) instead of (float (*)[2]). This matches the matrix
layout in libavresample so we can reuse assembly code between the two.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:46:28 +08:00
openvela-robot 0cbb12fb26 build: sort EXAMPLE_LIST 2026-04-20 18:46:24 +08:00
openvela-robot 10ad15b7fe x86/h264_weight: use appropriate register size for weight parameters
This fixes decoding corruption on 64 bit windows.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:46:21 +08:00
openvela-robot d06a69a740 avcodec/cuvid: use actual frame size for buffer allocation 2026-04-20 18:46:18 +08:00
openvela-robot 839e9ddca5 hevc: Change type of array stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
2026-04-20 18:46:15 +08:00
openvela-robot a0a924b3dc lavf/mov: Read display aspect ratio from ares atom also for dnxhd.
Fixes aspect ratio of sample in ticket #2125.
Fixes aspect ratio of sample in ticket #5325.
2026-04-20 18:46:12 +08:00
openvela-robot 8f828e55b5 x86: fpel: Remove unnecessary sign extend 2026-04-20 18:46:09 +08:00
openvela-robot 56447cb33b doc/codecs.texi: fix and expand color related options
Found-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:46:06 +08:00
openvela-robot 7f7c69bb3c vaapi_encode: Refactor initialisation
This allows better checking of capabilities and will make it easier
to add more functionality later.

It also commonises some duplicated code around rate control setup
and adds more comments explaining the internals.
2026-04-20 18:46:03 +08:00
openvela-robot 47c92e0af5 lavc/qdm2: increase code clarity
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2026-04-20 18:45:39 +08:00
openvela-robot 573af6a7c6 APIchanges: fix a typo in the version number 2026-04-20 18:45:36 +08:00
openvela-robot eb143e6c90 doc/filters: blend terminates on longest input
Signed-off-by: Mulvya <mulvya@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2026-04-20 18:45:33 +08:00
openvela-robot 677bc99f14 swscale: Update bitdepth range check
Make sure the scaling functions for the 9-15bits are used for
9-15bits bit depths correctly.
2026-04-20 18:45:30 +08:00
openvela-robot 661768b926 doc: Mention -dn in the "Stream selection" paragraph.
There is no "Data options" paragraph.
Requested-by: ilker tezcan
2026-04-20 18:45:27 +08:00
openvela-robot 020febff03 swscale: Consistently order input YUV pixel formats
Follow a 420, 422, 444 order instead of a random one.
This simplifies double-checking additions of new formats.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:45:25 +08:00
openvela-robot b3abe30261 ffmpeg: switch to the new BSF API
This commit is initially largely based on commit 4426540 from Anton
Khirnov <anton@khirnov.net> and two following fixes (80fb19b and
fe7b21c) which were previously skipped respectively in 98e3153, c9ee36e,
and 7fe7cdc.

mpeg4-bsf-unpack-bframes FATE reference is updated because the bsf
filter now actually fixes the extradata (mpeg4_unpack_bframes_init()
changing one byte is now honored on the output extradata).

The FATE references for remove_extra change because the packet flags
were wrong and the keyframes weren't marked, causing the bsf relying on
these proprieties to not actually work as intended.

The following was fixed by James Almer:

The filter option arguments are now also parsed correctly.

A hack to propagate extradata changed by bitstream filters after the
first av_bsf_receive_packet() call is added to maintain the current
behavior. This was previously done by av_bitstream_filter_filter() and
is needed for the aac_adtstoasc bsf.

The exit_on_error was not being checked anymore, and led to an exit
error in the last frame of h264_mp4toannexb test. Restoring this
behaviour prevents erroring out. The test is still changed as a result
due to the badly filtered frame now not being written after the failure.

Signed-off-by: Clément Bœsch <u@pkh.me>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:45:19 +08:00
openvela-robot be5453f52b nvenc: Add support for high bitdepth
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:45:17 +08:00
openvela-robot fedfa419f5 lavd/sdl2: Move unsupported formats SDL_PIXELFORMAT_xxx888 updwards.
There is a paragraph for unsupported SDL formats.
2026-04-20 18:45:14 +08:00
openvela-robot efc39eb5d1 nvenc: Make sure that enum and array index match
And use a macro to reduce the boilerplate.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:45:11 +08:00
openvela-robot 74d9c4b0e5 avformat/utils: force native h264 decoder for probing
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:45:06 +08:00
openvela-robot 2f4004d5d4 audiodsp: reorder arguments for vector_clipf
This will make the x86 asm simpler.

ARM conversion by Martin Storsjö <martin@martin.st> and Janne Grunau
<janne-libav@jannau.net>
2026-04-20 18:45:02 +08:00
openvela-robot 99aa7ac761 avutil/frame: Add a flag to discard frame after decode.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:44:57 +08:00
openvela-robot bb0cfa8117 audiodsp/x86: fix ff_vector_clip_int32_sse2
This version, which is the only one doing two processing cycles per loop
iteration, computes the load/store indices incorrectly for the second
cycle.

CC: libav-stable@libav.org
2026-04-20 18:44:54 +08:00
openvela-robot dce47a8711 vf_colorspace: Interpret unspecified color range as limited range
This is the assumption that is made in pixel format conversion do
throughout the code (in particular swscale), and BT-specifications
mandate.

Add a warning to inform the user that an automatic selection is being
made.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2026-04-20 18:44:51 +08:00
openvela-robot 90af6ec8f3 avcodec: Add the extended pixel format profile for HEVC
It is supported by the NVIDIA video SDK 7.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:44:49 +08:00
openvela-robot 68c7b3f0d1 doc/muxers: add flv muxer document into doc/muxers
add flvflags aac_seq_header_detect and flvflags no_sequence_end
document into doc/muxers

Reviewed-by: Lou Logan <lou@lrcd.com>
2026-04-20 18:44:44 +08:00
openvela-robot 3c4724b67c mpegvideo_motion: Handle edge emulation even without unrestricted_mv
Fix out of bounds read.

Bug-Id: 962
Found by: F4B3CD@STARLAB and Agostino Sarubbo
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:44:42 +08:00
openvela-robot 51f75ff5f2 libavformat/webm_chunk: Option to specify HTTP header
Add an option to specify HTTP header in the WebM Chunk Muxer (this
works the same way as the 'method' parameter in the HLS muxer).

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:44:38 +08:00
openvela-robot dc1d6d6e5b build: remove hardcoded name of version header
Fixes an oversight in 1316df7aa9.

CC: libav-stable@libav.org
2026-04-20 18:44:36 +08:00
openvela-robot 56d6fa2480 lavc: add hevc mediacodec decoder 2026-04-20 18:44:33 +08:00
openvela-robot e81de40c67 build: doc: more fine-grained dependencies for generated texi files 2026-04-20 18:44:30 +08:00
openvela-robot a569b0cae4 avcodec/adpcm: clip step for ADPCM MTAF decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:44:27 +08:00
openvela-robot 617253f7cb libdc1394: Distinguish between enumeration errors and no cameras found
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:44:25 +08:00
openvela-robot 0aa62a7e2c libavcodec/qsvdec_h2645.c: drop executable permission
Accidentally set in b93e223315.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2026-04-20 18:44:22 +08:00
openvela-robot 79d6d8a101 rtsp: Fix a crash with the RTSP muxer
This was introduced in bc2a32969e.

The whole block that the statement was added to is only
relevant when used as a demuxer, but the other statements
there have had other if statements guarding them. Make
sure to only run this whole block if being used as a
demuxer.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:44:19 +08:00
openvela-robot ee9ade3b8c vf_colorspace: Add modern names for color range option
Allows to use values returned from API and from ffprobe directly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:44:16 +08:00
openvela-robot e6c4d0d0ab vaapi_h264: Fix HRD bit_rate/cpb_size scaling
There should be an extra offset of 6 on bit_rate_scale and of 4 on
cpb_size_scale which were not accounted for here.
2026-04-20 18:44:14 +08:00
openvela-robot f894eb8d80 avformat/flvenc: Add () around &
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:43:57 +08:00
openvela-robot c02c072817 pixblockdsp: Change type of stride parameters to ptrdiff_t
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.

Also adjust parameter names to be "stride" everywhere.
2026-04-20 18:43:55 +08:00
openvela-robot 064ef70efb vf_colorspace: Add BT-names for gamma22/28 transfer option
Allows to use values returned from API and from ffprobe directly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2026-04-20 18:43:51 +08:00
openvela-robot 3e679e1c35 configure: Drop check_lib()/require() in favor of check_lib2()/require2()
The latter can do everything the former can do, but also handle conditions
the former cannot like multiple header #includes and checking for headers
and functions in a single test program, which is necessary for certain
library tests.
2026-04-20 18:43:49 +08:00
openvela-robot 62e73fbd4d avformat/tee: Use BSF list API
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
2026-04-20 18:43:45 +08:00
openvela-robot ab07a19d15 ppc: mpegvideo: Add proper runtime AltiVec detection 2026-04-20 18:43:42 +08:00
openvela-robot 184ace1ee0 avformat/mux: implement AVFMT_FLAG_SHORTEST
This will allow fixing several bugs with the -shortest option

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:43:39 +08:00
openvela-robot a7ed3720c9 ppc: Update #endif comments 2026-04-20 18:43:36 +08:00
openvela-robot 22299baf50 avfilter/vf_histogram: set foreground alpha if possible in destination format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:43:33 +08:00
openvela-robot 34da31cc9c vaapi_vp8: Explicitly include libva vp8 decode header
With some old libva versions <va/va.h> does not automatically include
the per-codec subsidiary headers, so we need to include the right one
explicitly ourselves.
2026-04-20 18:43:30 +08:00
openvela-robot ceb2c1a5ef avfilter/vf_datascope: let user change background opacity
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:43:26 +08:00
openvela-robot 7001cc838f vp8: Add hwaccel hooks
Also adds some extra fields to the main context structure that may
be needed by a hwaccel decoder.
2026-04-20 18:43:23 +08:00
openvela-robot 23e19c5b57 avcodec/nvenc: use frame size instead of surface size 2026-04-20 18:43:19 +08:00
openvela-robot 2dbaafc3bc utvideo: Change type of array stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
2026-04-20 18:43:17 +08:00
openvela-robot 9c95a03f25 cuvid: Add hwaccels and decoders for remaining supported formats
cuvid/nvdecode also supports mpeg1, mpeg2, h.263/mpeg4-asp and mjpeg.

It should, in theory, also support wmv3 via the vc1 support, given
that vdpau supports this. However, it failed to play wmv3 samples
which vdpau played correctly, so I'm not sure what to make of it.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2026-04-20 18:43:12 +08:00
openvela-robot 4e66508f86 configure: Simplify clock_gettime() test 2026-04-20 18:43:09 +08:00
openvela-robot dc86300116 avfilter/vf_owdenoise: hight bit-depth support 2026-04-20 18:43:06 +08:00
openvela-robot e5c666c069 configure: Move initial VAAPI check to a more sensible place 2026-04-20 18:43:03 +08:00
openvela-robot 2f6b41284e vf_colorspace: Allow overriding input color properties
The filter needs input frames with color properties filled out by
the decoder. Since this is not always possible, add input options to
the filter so that user may override color space, color primaries,
transfer characteristics, and color range, as well as a generic option
to set all properties at once.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:42:59 +08:00
openvela-robot c4170fc6d9 copy_block: Change type of array stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
2026-04-20 18:42:56 +08:00
openvela-robot da840993f2 fate: add 12bpp sample
Allows testing simple_idct12 correctness/bitexactness, as the sample
was generated using faani as idct.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:42:53 +08:00
openvela-robot a81233204b indeo: Change type of array pitch parameters to ptrdiff_t
ptrdiff_t is the correct type for array pitches and similar.
2026-04-20 18:42:51 +08:00
openvela-robot 89ab5336d1 lavf/udp: Do not use MCAST_* for multicast on tvOS.
Fixes ticket #5774.
2026-04-20 18:42:48 +08:00
openvela-robot 4c44b34b9e Drop memalign hack
It no longer serves a useful purpose.
2026-04-20 18:42:45 +08:00
openvela-robot f8ffc7efb2 avfilter/vf_lut: unbreak planar rgb suppot on big-endian 2026-04-20 18:42:40 +08:00
openvela-robot a7af01ea8c Changelog: mark the release 12 branch 2026-04-20 18:42:37 +08:00
openvela-robot 0731906326 avformat/hlsenc: add warning for append_list and hls_init_time option
When use append_list mode, the hls_init_time set nouse,
Because the append_list only support append at the old m3u8 end
cannot set init segments durations at the middle of the list.
That's invalid. and show a warning message for user.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:42:34 +08:00
openvela-robot f5222183df wmavoice: Simplify GetBitContext initialization 2026-04-20 18:42:20 +08:00
openvela-robot a0b55e523c avisynth: support pix_fmts added to AviSynth+
A number of new pix_fmts have been added to AviSynth+:
16-bit packed RGB and RGBA
10-, 12-, 14, and 16-bit YUV 4:2:0, 4:2:2, and 4:4:4
8-, 10-, 12-, 14-, and 16-bit Planar RGB
8-, 10-, 12-, 14-, and 16-bit Planar YUVA and Planar RGBA*
10-, 12-, 14-, and 16-bit GRAY variants*
32-bit floating point Planar YUV(A), Planar RGB(A), and GRAY*

*some of which are not currently available pix_fmts here and were
 not added to the demuxer due to this

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:42:17 +08:00
openvela-robot 50f820a022 avprobe: Fix memory leak
After init_opts() there needs to be an uninit_opts() call
to free the swscale context and other buffers.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:42:14 +08:00
openvela-robot 7d30e5890e avfilter: add nb_threads to AVFilterContext
To be used in following commits.
2026-04-20 18:42:11 +08:00
openvela-robot b16077b0fd mov: Remove ancient heuristic hack
This breaks files with legitimate single-entry edit lists,
and the hack, introduced in f03a081df0,
has no link to any known sample in its commit message.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:42:08 +08:00
openvela-robot 13ceb05ad1 avfilter/motion_estimation: Fix warning: variable dir_x set but not used
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:42:03 +08:00
openvela-robot 78a5fe0deb vp8: Change type of stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
2026-04-20 18:42:00 +08:00
openvela-robot e70bf80323 avfilter: added motion estimation and interpolation filters
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:41:57 +08:00
openvela-robot 419f617fed doc: Document FATE option HWACCEL 2026-04-20 18:41:55 +08:00
openvela-robot eed1a6f8d7 fate: add test for af_hdcd analyze mode
Signed-off-by: Burt P <pburt0@gmail.com>
2026-04-20 18:41:51 +08:00
openvela-robot 05bb7e10b0 av1: Add codec_id and basic demuxing support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:41:48 +08:00
openvela-robot c5f857ced8 lavf/movenc: Add a missing assignment if memory allocation fails.
Fixes a warning:
libavformat/movenc.c:5947:17: warning: statement with no effect [-Wunused-value]
2026-04-20 18:41:45 +08:00
openvela-robot be3982078f configure: Set __MSVCRT_VERSION__to 0x0700 for MinGW
This exposes some required functionality like _aligned_malloc() in the
MinGW system headers, thus obviating the need for the memalign hack.
2026-04-20 18:41:42 +08:00
openvela-robot 9dd62f4599 avfilter/avf_showspectrum: do not use uninitialized memory 2026-04-20 18:41:35 +08:00
openvela-robot 19d299023a vmnc: check that subrectangles fit into their containing rectangles
Fixes possible invalid writes with corrupted files.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2026-04-20 18:41:32 +08:00
openvela-robot 98f053e972 avfilter: add bitplanenoise filter 2026-04-20 18:41:28 +08:00
openvela-robot d02be79e39 mpeg4videoenc: Kill non-compiling disabled cruft 2026-04-20 18:41:24 +08:00
openvela-robot a2fab0d2da doc/bsfs: Fix bsf options divider in documentation
The actual implementation uses ':' divider, not '/' as
documented.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:41:18 +08:00
openvela-robot ab3dc4d185 vaapi_h264: Constify pointers 2026-04-20 18:41:15 +08:00
openvela-robot e0e377b23a fate: add test for compand filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:41:12 +08:00
openvela-robot c86f79bf7e Prepare for 12_alpha1 Release 2026-04-20 18:41:10 +08:00
openvela-robot 743d1cdc11 avcodec/utils: only warn when passed invalid lowres value
This makes it easier to use the lowres option when dealing with input
files in different codecs. If the codec doesn't support lowres=1 for
instance, it will throw a warning and use lowres=0 instead of erroring
out completely.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:41:07 +08:00
openvela-robot 3de3268944 avconv: Check the fifo allocation 2026-04-20 18:41:04 +08:00
openvela-robot 10ecc0bb9e avformat/id3v2: fix memleak with empty strings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:41:00 +08:00
openvela-robot 01ed041cd0 h264_direct: use the reference mask from the actual reference
Not from the underlying frame. Fixes races with frame threading in
field-coded files, where decoding would wait for the wrong field (e.g.
random failures in mixed-nal-coding).

Bug-Id: 954
2026-04-20 18:40:55 +08:00
openvela-robot 731a7839d9 doc/filters: Fix option ranges for the sab filter.
Fixes ticket #5751.
2026-04-20 18:40:30 +08:00
openvela-robot 50c52d81ba dvbsubdec: Use NULL instead of 0 as pointer value 2026-04-20 18:40:26 +08:00
openvela-robot a7916742dc avformat/tee: Factor parse_slave_options() out
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:40:22 +08:00
openvela-robot 9751214879 Revert "Don't use expressions with side effects in macro parameters"
This reverts commit 25bacd0a0c.

Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, so revert to the more readable version of these.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:40:20 +08:00
openvela-robot 19c97a02ef fate: add test for tremolo filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:40:16 +08:00
openvela-robot 6ac060f649 intreadwrite: Add intermediate variables in the byteswise AV_W*() macros
This avoids issues with expanding the argument multiple times,
and makes sure that it is of the right type for the following shifts.

Even if the caller of a macro could be expected not to pass parameters
that have side effects if expanded multiple times, these fallback
codepaths are rarely, if ever, tested, so it is expected that such
issues can arise.

Thefore, for safety, make sure the fallback codepaths only expand
the arguments once.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:40:14 +08:00
openvela-robot faa4d0c6ea Doxygen: Re-enable JAVADOC_AUTOBRIEF 2026-04-20 18:40:03 +08:00
openvela-robot 1d9c1f3311 dxv: Check to make sure we don't overrun buffers on corrupt inputs
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:40:00 +08:00
openvela-robot d7cd318d20 af_hdcd: fix a minor cosmetic annoyance
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:39:57 +08:00
openvela-robot 88b64a66b5 Fix instances of broken indentation found by gcc 6 2026-04-20 18:39:54 +08:00
openvela-robot bf57327965 avfilter: Add new format for PSNR stats log
Add an AVOption stats_version with a new header for V2 stats, which
specifies the stats log version and lists the fields that will be
present in the log (to ease parsing).

The primary motivation is to facilitate the addition of optional fields
to the log without breaking backwards compatibility, while making the
logs easier to parse.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:39:51 +08:00
openvela-robot 2ce9a8c652 mov: Validate the ID number
IDs in MOV start from 1.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:39:48 +08:00
openvela-robot 686b89bc22 lavc/ffjni: replace ff_jni_{attach,detach} with ff_jni_get_env
If a JNI environment is not already attached to the thread where the
MediaCodec calls are made the current implementation will attach /
detach an environment for each MediaCodec call wasting some CPU time.

ff_jni_get_env replaces ff_jni_{attach,detach} by permanently attaching
an environment (if it is not already the case) to the current thread.
The environment will be automatically detached at the thread destruction
using a pthread_key callback.

Saves around 5% of CPU time (out of 20%) while decoding a stream with
MediaCodec.
2026-04-20 18:39:33 +08:00
openvela-robot 9bc78a6db1 avconv: Check that muxing_queue exists before reading from it
This avoids a segfault on nonexisting codec names.
2026-04-20 18:39:31 +08:00
openvela-robot 89c2dd7dc7 ffprobe: add missing PROGRAM_STREAM_TAGS case
ffprobe did not show tags with only '-show_entries programs'

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:39:27 +08:00
openvela-robot ac44763b3a configure: Check for strtoll and redirect to _strtoi64 in the msvcrt block
This allows doing this redirection, if building with clang against
old enough MSVC headers that lack strtoll (2012 and older).

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:39:24 +08:00
openvela-robot f6ad63523e libavformat/matroskadec: fix unsigned overflow to improve seeking
When seeking a file where codec delay is greater than 0, the timecode
can become negative after offsetting by the codec delay. Failing to cast
to a signed int64 will cause the check against skip_to_timecode to evaluate
true for these negative values. This breaks the "skip_to" seek mechanism.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:39:19 +08:00
openvela-robot 78474ad6cb vpx: Support color range
The range field has been introduced in version 1.6.0
2026-04-20 18:39:17 +08:00
openvela-robot a7a1a9e3d9 ffmpeg.c: copy video profile when using stream_copy
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:39:14 +08:00
openvela-robot b527aaf343 riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data.
According to the specification on the MSDN [1], 0 is valid for that
particular field, and it should be ignored in that case.

[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757714(v=vs.85).aspx

Bug-Id: 950

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:38:59 +08:00
openvela-robot 789655841d doc/protocols: Fix seperated typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:38:54 +08:00
openvela-robot a981230446 arm: Check for support for the .fpu directive
When targeting COFF (windows), clang doesn't support this
directive (while binutils supports it for all targets).

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:38:52 +08:00
openvela-robot 5e85a3db27 fate: add test for dcshift filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:38:48 +08:00
openvela-robot e6efb471b1 ratecontrol: Move mpegenc-only function where it is used 2026-04-20 18:38:45 +08:00
openvela-robot 73130d0c83 x86/diracdsp: make ff_put_signed_rect_clamped_10_sse4 work on x86_32
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:38:42 +08:00
openvela-robot 625f19c900 hevc: set profile based on the profile compatibility flags if needed
This fixes retrieving a valid profile for many of the FATE conformance samples,
allowing them to be properly decoded by the HWAccel after adding a profile check.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:38:39 +08:00
openvela-robot 681bd07531 MAINTAINERS: add myself for libopenmpt
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:38:35 +08:00
openvela-robot 6d82826774 x86util: Extend SPLATW for avx2
Integration to Libav by Josh de Kock <josh@itanimul.li>.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
2026-04-20 18:38:32 +08:00
openvela-robot 9b2f396d07 tools/patcheck: add a couple more common typos
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:38:29 +08:00
openvela-robot 1da33dcf33 checkasm: arm: Ignore changes to bits 0-4 and 7 of FPSCR
These bits are set by exceptions in NEON instructions.

Also print the differing bits when FPSCR is clobbered,
and use bic instead of lsl, for clearing the topmost bits.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:38:26 +08:00
openvela-robot cfa18ac103 libavformat/libopenmpt: Fix memory leak in error path in read_header_openmpt().
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:38:23 +08:00
openvela-robot 7dce785655 checkasm: arm: Don't start new const blocks for each string
Each const block needs to be terminated by one endconst
invocation so either call endconst after each, or just
declare plain labels to the later strings.

This fixes errors such as this, on some binutils versions:

checkasm.S:38: Error: Macro `endconst' was already defined

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:38:21 +08:00
openvela-robot dbef91e4e5 configure: add missing loongson dependencies
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:38:18 +08:00
openvela-robot b5efad0807 swscale: Rename sws_context_class to ff_sws_context_class
It is an internal swscale symbol and thus should not be exported.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:38:15 +08:00
openvela-robot 6e3c8530d7 refine the method option describe of hlsenc doc
Signed-off-by: LiuQi <liuqi@gosun.com>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:38:12 +08:00
openvela-robot 37d018ed00 mp3dec: read the initial/trailing padding from the LAME tag 2026-04-20 18:38:09 +08:00
openvela-robot a8f14e1237 Restore compatibility with powerpc-apple-darwin9-gcc-4.2.1
... and attempt to preserve compatibility with clang that was
introduced in 311a953c76 (untested)

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:38:06 +08:00
openvela-robot f88bc737ec mov: fix stream extradata_size allocation
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:38:03 +08:00
openvela-robot 6bf261ebb4 dirac_vlc: fix undefined shifts
Shifting by more than 63 bits is undefined behavior, athough any
compiler not returning 0 after shifting by any amount would be insane.

Found by Coverity, fixes CID1363959 and CID1363960

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2026-04-20 18:37:54 +08:00
openvela-robot 7b2cd545e9 h2645_parse: handle embedded Annex B NAL units in size prefixed NAL units
Fixes a regression in ca2f19b9cc with some mov/mp4 files. The files have
several NAL units in the supposed single NAL unit after the size field.
Annex B start code prefixes are used to separate them. The first NAL unit
is correctly parsed but the buffer does not point to the next size field.
Instead semi random data (it seems to be the rbsp_stop_one_bit and the
start code prefix) is then parsed as length and will exceed the
remaining length of the buffer.

Patch based on the code in h264's decode_nal_units() and a similar
patch by Hendrik Leppkes in FFmpeg (a9bb4cf87d).

Bug-Id: ffmpeg/trac5529
Reported-By: Vittorio Giovara
2026-04-20 18:37:51 +08:00
openvela-robot 99b6339ae7 lavc/Makefile: Fix standalone compilation of the lame encoder.
Also fix a possible issue with the mpegaudio audiotoolbox decoders.
Fixes ticket #5703.
2026-04-20 18:37:43 +08:00
openvela-robot 6b5d5ac078 d3d11va: don't keep the context lock while waiting for a frame
also fixes a deadlock found by Денис Кулаков <kudesnik33ra@gmail.com>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:37:40 +08:00
openvela-robot 7ace5b956a avutil/parseutils: dont assume standard time when parsing a timestamp
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 18:37:37 +08:00
openvela-robot 65ce742a39 doc: escape left brace in texi2pod.pl regex
Unescaped literal left braces are deprecated and a warning was added in
Perl 5.22.
2026-04-20 18:37:34 +08:00
openvela-robot d806206062 Changed metadata print option to accept general urls
This is an - once again - updated patch, that uses avio_write instead
of avio_puts to stream clean text output without null characters. Works
now for me as intended.

Changes metadata filter to accept general urls as file argument without
breaking former behaviour. As a byproduct, it also allows for writing to
file "-" if specified as "file:-".

Example:

ffmpeg -i test.wav -filter_complex "silencedetect=n=-40dB:d=0.1,ametadata=mode=print:file='pipe\:4'" -f null

Signed-off-by: Sami Hult <sami.hult@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:37:31 +08:00
openvela-robot 47020e13da libopenh264: Support building with the 1.6 release
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:37:29 +08:00
openvela-robot 6db2b12e6a h2645_parse: only read avc length code at the correct position
Reading it from any other position would result in a wrong size being
read, instead fallback to the re-sync mechanic in the else clause.
2026-04-20 18:37:02 +08:00
openvela-robot b4dacfe659 checkasm: Add tests for vp8dsp
The tests are inspired by similar tests for vp9 by
Ronald Bultje.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:37:00 +08:00
openvela-robot 16637c86cf lavc/h264_slice: use sps directly when checking for invalid 8x8 inference 2026-04-20 18:36:55 +08:00
openvela-robot 1d57751ab2 hwcontext_qsv: add support for p010 2026-04-20 18:36:53 +08:00
openvela-robot 251201b4ed tests/checkasm/pixblockdsp: Test 8 byte aligned positions
The code is documented as to require 8byte alignment

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:36:49 +08:00
openvela-robot 69db908718 oggparseopus: export pre-skip
Bug-Id: 945, along with the following commit
2026-04-20 18:36:46 +08:00
openvela-robot df30ffe633 h264: make H264ParamSets sps const 2026-04-20 18:36:38 +08:00
openvela-robot f7932b7dd8 checkasm: hevc: Iterate over features first, then over bitdepths
This avoids listing the same feature multiple times in the
test output. Previously the output contained something like this:

SSE2:
 - hevc_mc.qpel              [OK]
 - hevc_mc.epel              [OK]
 - hevc_mc.unweighted_pred   [OK]
 - hevc_mc.qpel              [OK]
 - hevc_mc.epel              [OK]
 - hevc_mc.unweighted_pred   [OK]

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:36:35 +08:00
openvela-robot 4fdf0435db ffplay: Fix usage of private lavfi API
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:36:19 +08:00
openvela-robot e3816421d1 build: Add a new component for H.264 parsing code
This fixes standalone compilation of the SVQ3 decoder, which had
incomplete dependencies related to H.264 parsing.
2026-04-20 18:36:17 +08:00
openvela-robot ace082bddc lavc/mediacodecdec_h264: add missing NAL headers to SPS/PPS buffers
Fixes a regression introduced by 0cd5e281df.
2026-04-20 18:35:54 +08:00
openvela-robot 680833b5b6 ffv1: Remove version 2 and mark version 3 as non-experimental
The encoder produces bitstream compatible with the current specification
and version 2 is set as reserved (non-standardizable).
2026-04-20 18:35:51 +08:00
openvela-robot 7b6e356c3d fate/webp : add test for lossy compression.
the result of ffmpeg decoding is binary exact with the yuv output of
official decoder (dwebp)

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:35:48 +08:00
openvela-robot e7fa81da8e avconv: move flushing the queued frames to configure_filtergraph()
This is a more appropriate place for it, and will also be useful in the
following commit.
2026-04-20 18:35:45 +08:00
openvela-robot ad72085f2f Merge commit 'c5fd4b50610f62cbb3baa4f4108139363128dea1'
* commit 'c5fd4b50610f62cbb3baa4f4108139363128dea1':
  build: Simplify postprocessing of linker version script files

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 18:35:39 +08:00
openvela-robot a3f233b587 pixdesc: Add aliases to SMPTE color properties
Drop ST from names and symbols, it does not add anything distinctive or
descriptive.
2026-04-20 18:35:37 +08:00
openvela-robot 0c88e0764f fate/exr : add tests for file with half and float channels
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:35:28 +08:00
openvela-robot a25f8c83cd avconv: Remove hw_device_ctx output filter reinit hack
Not needed any more because we no longer have any useful case which
will reinitialise with hardware frames here.
2026-04-20 18:35:15 +08:00
openvela-robot f2c1f5bced ffmpeg: do not use deprecated AVSubtitleRect.pict 2026-04-20 18:34:35 +08:00
openvela-robot 299a293793 avconv: factor out initializing stream parameters for encoding
Setting the filter input parameters is moved to init_input_stream(),
so that it is done before the decoder is opened, potentially overwriting
the information from avformat_find_stream_info() with less accurate
data.

This commit temporarily disables QSV transcoding with hw frames. The
functionality will be re-added in the following commits.
2026-04-20 18:34:33 +08:00
openvela-robot bddcb533d0 Merge commit 'c0f4c7db9fea1c07d290a298b8db858b7ceed96d'
* commit 'c0f4c7db9fea1c07d290a298b8db858b7ceed96d':
  configure: move the hardware accel libs' entries in the help text

Merged-by: Clément Bœsch <u@pkh.me>
2026-04-20 18:34:26 +08:00
openvela-robot 1d6ec89e4d avconv: explicitly postpone writing the header until all streams are initialized
This should have no practical effect for now, but will make a difference
in the following commits.
2026-04-20 18:34:24 +08:00
openvela-robot 347549d03c Merge commit 'db7968bff4851c2be79b15b2cb2ae747424d2fca'
* commit 'db7968bff4851c2be79b15b2cb2ae747424d2fca':
  avio: Allow custom IO users to get labels for the output bytestream

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2026-04-20 18:34:00 +08:00
openvela-robot 82067d2aaa h264: Eliminate unused but set variable
libavcodec/h264_slice.c:1384:9: warning: variable 'droppable' set but not used
2026-04-20 18:33:57 +08:00
openvela-robot 9aa17b80d6 avformat/mpegts: include stream type for aac
this removes the need to probe to discover aac streams
inside mpegts containers, thus speeding up initial playback.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:33:06 +08:00
openvela-robot 0d62b1c12f lavc: allow using AVCodecContext.hw_frames_ctx for decoding
For now it will only be used by the default get_buffer2 callback for
allocating hw frames.
2026-04-20 18:33:03 +08:00
openvela-robot 064c30a0db Merge commit '5c31eaa9998b2185e0aa04d11adff128498dc14a'
* commit '5c31eaa9998b2185e0aa04d11adff128498dc14a':
  Remove unnecessary get_bits.h #includes and add missing headers where needed.

Merged-by: Clément Bœsch <clement@stupeflix.com>
2026-04-20 18:33:00 +08:00
openvela-robot 6a79eb573c truemotion2rt: Use ff_set_dimensions 2026-04-20 18:32:57 +08:00
openvela-robot c078c0c40f Merge commit '015c2d923902fcd562571993eaf1231ce388c7f0'
* commit '015c2d923902fcd562571993eaf1231ce388c7f0':
  libopencore-amr: Fix ff_dlog()/av_log() invocations

The log changed in our tree in 4a28962454
is kept as is since it's the correct thing to do (the log mentions what
the first byte *was*, so it's refering to the source packet, not the
encoded bitstream).

Merged-by: Clément Bœsch <clement@stupeflix.com>
2026-04-20 18:32:52 +08:00
openvela-robot 0950ce9ff8 pixdesc: Add new SMPTE 431, 432, and 2085 color properties
Appeared in H.264 2016/02.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:32:50 +08:00
openvela-robot 1c3c3b36e2 Merge commit '0f40c9098498ad90dbbd2380eb4269015e84bde4'
* commit '0f40c9098498ad90dbbd2380eb4269015e84bde4':
  Drop pointless assert.h #includes

Merged-by: Clément Bœsch <clement@stupeflix.com>
2026-04-20 18:32:47 +08:00
openvela-robot ce0d040e87 pixfmt: Add ARIB STD-B76 color transfer characteristic
Adding hybrid log-gamma (https://en.wikipedia.org/wiki/Hybrid_Log-Gamma)
based on the standardization in ARIB STD-B67:
http://www.arib.or.jp/english/html/overview/doc/2-STD-B67v1_0.pdf

The choice of enum value of 18 is consistent with HEVC:
http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=10481

And also with latest proposal for color format in mkv:
https://mailarchive.ietf.org/arch/search/?email_list=cellar&gbt=1&q=Colour+Format+proposal

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:32:45 +08:00
openvela-robot adb6eaa2ac Merge commit '5b1409c75563b4a3aca113c34d09e3b5442de47f'
* commit '5b1409c75563b4a3aca113c34d09e3b5442de47f':
  fate: Add test for MSS1

Test was already present, see 849e55e58e.

The merge removes the audio decoding present in our version and
simplifies the rules.

Merged-by: Clément Bœsch <clement@stupeflix.com>
2026-04-20 18:32:12 +08:00
openvela-robot c823b34eb5 avconv: add a function for determining whether a filtergraph is simple
This makes the code easier to read.
2026-04-20 18:32:09 +08:00
openvela-robot 61e4c0c792 Merge commit '2e5bde956519ae19cedfa482e199518e495bcaf5'
* commit '2e5bde956519ae19cedfa482e199518e495bcaf5':
  h264: eliminate max_contexts

This commit is a noop as max_contexts can change and mismatch the
nb_slice_ctx (see 507b01f899).

The file in the Ticket is not decodable anymore, so it was not possible
to check if that code path was triggerable some way or another, or even
test a different fix.

Merged-by: Clément Bœsch <clement@stupeflix.com>
2026-04-20 18:32:02 +08:00
openvela-robot a33909cc8b h264: pass a H2645NAL to slice header decoding
Replace the decoder-global nal_unit_type/nal_ref_idc variables with the
per-NAL ones. The decoder-global ones still cannot be removed because
they are used by hwaccels.
2026-04-20 18:31:58 +08:00
openvela-robot c20ab98e31 swresample/x86: add support for exact_rational
phase_shift and phase_mask is removed
generally exact_rational=on is faster than exact_rational=off

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2026-04-20 18:31:53 +08:00
openvela-robot 62743edefd Add MagicYUV decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:31:50 +08:00
openvela-robot aa69bb6376 Merge commit '728d90a0c1973661a9e73da697bf4f90c9d19577'
* commit '728d90a0c1973661a9e73da697bf4f90c9d19577':
  h264: decouple h264_sei from the h264 decoder

Main changes:

- SEI decoding doesn't have access to the debug flag in the codec context so a
  few logging are dropped.

- naming of quincunx_sampling_flag and frame_packing_arrangement_type are kept
  as they are in FFmpeg instead of respectively quincunx_subsampling and
  arrangement_type used in Libav because the former match the specifications.

- don't reset the x264 build info once read in order to fix
  fate-h264-lossless (change by Hendrik)

- H264Context.has_recovery_point and deprecated
  AVCodecContext.dtg_active_format are set after ff_h264_sei_decode()
  based on the SEI state since ff_h264_sei_decode() doesn't have access
  to H264Context anymore.

- frame_packing_arrangement_type is not checked against <= 0 in
  decode_postinit() since it is always read as a positive value with
  get_bits(). This fixes a -Wtype-limits warning by GCC spotted by
  Michael.

Side Notes:

- tested that ffprobe on the file from ticket #3652 still returns 4
  keyframes
- tested that playback from ticket #3063 still works

Merged-by: Clément Bœsch <clement@stupeflix.com>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2026-04-20 18:31:31 +08:00
openvela-robot 113e36ca98 ffv1: Error out on unsupported format
Transparency is supported only by YUV and within specific bit depths.
2026-04-20 18:31:28 +08:00
openvela-robot 1a91034674 avcodec/snow: Remove unused function
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:31:25 +08:00
openvela-robot c22899c2bd checkasm: Add tests for h264 idct
The tests are inspired by similar tests for vp9 by
Ronald Bultje.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:31:23 +08:00
openvela-robot 204f4cf376 fate/h264: add test for ticket #631 2026-04-20 18:31:19 +08:00
openvela-robot ca797ea832 h264: Support AV_PKT_DATA_NEW_EXTRADATA 2026-04-20 18:31:17 +08:00
openvela-robot d165d30c75 lavf/utils: fix timestamp trace log in estimate_timings() function
Use the correct timebase, also replace "stream" with "format" in the
context of the format.
2026-04-20 18:31:12 +08:00
openvela-robot a74a6e617d h264: Drop unused function check_opcodes() 2026-04-20 18:31:09 +08:00
openvela-robot 2b686e0773 rtpenc: packetizer for VP9 RTP payload format (draft v2) 2026-04-20 18:31:05 +08:00
openvela-robot 2f9333386b pixdesc: Use C99 array to list color properties names 2026-04-20 18:31:02 +08:00
openvela-robot 7a7d88aa89 lavc/vda_h264: fixes compilation after 1534ef87 2026-04-20 18:30:58 +08:00
openvela-robot b8b53ac115 h264: start splitting decode_slice_header()
That function is currently very long and entangles bitstream parsing and
decoder configuration. This makes the code much harder to read than
necessary.

Begin splitting the code that configures the decoder state based on the
slice header information from the parsing of the slice header.
2026-04-20 18:30:55 +08:00
openvela-robot ac769b437b avcodec/sheervideo: fix predictions for c82p format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:30:47 +08:00
openvela-robot 1a23197575 vaapi_h264: Add support for SEI messages
Send buffering_period and pic_timing messages when in modes
targetting bitrate.  Also adds NAL HRD parameters to VUI.
2026-04-20 18:30:44 +08:00
openvela-robot 608e6785b1 avutil/x86util: move haddps sse emulation from showcqt
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:30:40 +08:00
openvela-robot 621bf0dcf8 dvbsub_parser: Add missing mem.h #include 2026-04-20 18:30:38 +08:00
openvela-robot 7d62d6b450 avformat/rawdec: Fix avg_framerate for h264
The framerate is 25 which is a fixed default and is wrong undo the 1 line
change which caused this regression
Only the avg_frame rate setting is removed
The timebase update is not done as there was a objection (see ML)
Fixes Ticket 5444

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:30:22 +08:00
openvela-robot 3779443de7 Remove unnecessary get_bits.h #includes 2026-04-20 18:30:18 +08:00
openvela-robot 998862b5e6 avformat/mpegts: Do not trust BSSD descriptor, it is sometimes not an S302M stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:30:14 +08:00
openvela-robot 7322628e43 avconv: Do not copy extradata if source buffer is empty
Fixes clang-usan runtime error "null pointer passed as argument 2,
which is declared to never be null" while streamcopying.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:30:11 +08:00
openvela-robot 95164158a7 Seperate x264rgb encoder and only enable when its actually supported
This avoids enabling and building the x264rgb encoder when its actually not supported and
thus would not work

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:30:07 +08:00
openvela-robot 6471e7ece4 vp9: Return the correct size when decoding a superframe
According to avcodec.h, avcodec_decode_video2 should return the number of
bytes used if a frame was decoded.

The current implementation returns size - used size of all the subframes.
This fixes the VLC's bug https://trac.videolan.org/vlc/ticket/16836.

The superframe is always fully consumed.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:30:04 +08:00
openvela-robot f8296eceb3 avcodec/mips/h264qpel_mmi.c: Version 2 of the optimizations for loongson mmi
1. no longer use the register names directly and optimized code format
2. to be compatible with O32, specify type of address variable with mips_reg and handle the address variable with PTR_ operator
3. use uld and mtc1 to workaround cpu 3A2000 gslwlc1 bug (gslwlc1 instruction extension bug in O32 ABI)
4. h264qpel use hepldsp optimizations

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:29:57 +08:00
openvela-robot 9e0e2a7014 build: Only enable symbol reduction if the compiler does proper DCE
With compilers that do not support proper dead code elimination, like
Sun C 5.12, linking fails due to missing references to unavailable,
but also unused, symbols.

Bug-Id: 895
2026-04-20 18:29:54 +08:00
openvela-robot d48446695f avfilter/vf_fieldhint: Reorder operation to prevent hypothetical integer overflow
Fixes CID1355110

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:29:51 +08:00
openvela-robot 997925ae0d build: Print a message when generating version scripts 2026-04-20 18:29:48 +08:00
openvela-robot 104a80bb08 fate: add aemphasis test
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:29:45 +08:00
openvela-robot 9aab67300f Drop unnecessary libavutil/x86/asm.h #includes 2026-04-20 18:29:42 +08:00
openvela-robot 329adda5c9 avcodec/proresdec2: Add support for grayscale videos
Signed-off-by: Håvard Espeland <espeland@mixedrealities.no>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:29:39 +08:00
openvela-robot 21a6a5dbb7 ac3: Check the array bound before dereferencing
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:29:36 +08:00
openvela-robot 9120e63adf Merge commit '44d16df413878588659dd8901bba016b5a869fd1'
* commit '44d16df413878588659dd8901bba016b5a869fd1':
  h264_parser: eliminate H264SliceContext usage

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2026-04-20 18:29:33 +08:00
openvela-robot d84c9d98af build: Ignore generated mapfile and remove it on distclean 2026-04-20 18:29:30 +08:00
openvela-robot bb7a7de878 avcodec/dca: move EXSS sampling frequency arrays to dca.c
Avoids unwanted parser dependency on dcadata.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:29:27 +08:00
openvela-robot b3d6b2d184 lavc: handle hw_frames_ctx where necessary
avcodec_copy_context() didn't handle hw_frames_ctx references correctly
which could cause crashes.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:29:24 +08:00
openvela-robot 6e957319a7 lavc/mediacodec: factorize static fields initialization 2026-04-20 18:29:21 +08:00
openvela-robot 117250bda4 golomb: Give svq3_get_se_golomb()/svq3_get_ue_golomb() better names 2026-04-20 18:29:18 +08:00
openvela-robot e4c5a3cb16 avcodec/dca_exss: prepare to be called from parser context
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:29:15 +08:00
openvela-robot 57e3b102d7 fate: More fine-grained dependencies for voice codec tests 2026-04-20 18:29:12 +08:00
openvela-robot 88a0ce5222 avfilter/af_hdcd: Replace complexer expression by litteral constant
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:29:09 +08:00
openvela-robot d3876d2195 avcodec: Bump micro version after changing public JPEG 2000 defines 2026-04-20 18:29:06 +08:00
openvela-robot fb2c96297b libavutil/opencl: fixed uninitialized var warning
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:29:03 +08:00
openvela-robot 5106c5f5ac avfiltergraph: check the query_formats() return value 2026-04-20 18:29:00 +08:00
openvela-robot faf12dd37b avcodec/truemotion2rt: also export key frame info
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:28:57 +08:00
openvela-robot a3f3bfbbf8 mp3: Make the extrasize explicit
Initialize the bit buffer with the correct size (amount of bits that will
be read) instead of relying on the bitstream reader overreading the
correct values.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:28:54 +08:00
openvela-robot cdaed97bf5 avcodec/iff: mention RGB8/RGBN decoder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:28:51 +08:00
openvela-robot 7be5ff5a3b avconv: stop using AVStream.codec
It is now only used by the av_parser_change() call during streamcopy, so
allocate a special AVCodecContext instance for this case. This instance
should go away when the new parser API is finished.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:28:48 +08:00
openvela-robot aee61a4db0 avcodec/iff: add support for ANBR files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:28:30 +08:00
openvela-robot c829d78cdc mov: Print reason of loci parsing failure
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:28:25 +08:00
openvela-robot ab0549f3df avfilter: add loudnorm
Signed-off-by: Kyle Swanson <k@ylo.ph>
2026-04-20 18:28:22 +08:00
openvela-robot 63674e41fe movenc: Add a missed const
This was missed in e1eb0fc960, when ff_interleaved_peek was
changed to include const during the evolution of the patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:28:19 +08:00
openvela-robot 96c7f6810b avcodec/iff: scala anim32 & anim16 decompression
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:28:16 +08:00
openvela-robot 7fab1ff87c avio: Allow custom IO users to get labels for the output bytestream
This allows callers with avio write callbacks to get the bytestream
positions that correspond to keyframes, suitable for live streaming.

In the simplest form, a caller could expect that a header is written
to the bytestream during the avformat_write_header, and the data
output to the avio context during e.g. av_write_frame corresponds
exactly to the current packet passed in.

When combined with av_interleaved_write_frame, and with muxers that
do buffering (most muxers that do some sort of fragmenting or
clustering), the mapping from input data to bytestream positions
is nontrivial.

This allows callers to get directly information about what part
of the bytestream is what, without having to resort to assumptions
about the muxer behaviour.

One keyframe/fragment/block can still be split into multiple (if
they are larger than the aviocontext buffer), which would call
the callback with e.g. AVIO_DATA_MARKER_SYNC_POINT, followed by
AVIO_DATA_MARKER_UNKNOWN for the second time it is called with
the following data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:28:13 +08:00
openvela-robot c45f7ec164 avformat/utils: Check negative bps before shifting in ff_get_pcm_codec_id()
Fixes: undefined shift.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:28:10 +08:00
openvela-robot 2d11ad7373 lavf: Raw G.729 demuxer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2026-04-20 18:28:08 +08:00
openvela-robot 1cb0ff5513 h2645_parse: support badly muxed mp4 streams
Some streams contain an additional AnnexB NAL inside the mp4/nalff NALU.
This commonly occurs in interlaced streams where both fields are packed
into the same MP4 NAL with an AnnexB startcode in between.

Port handling of this format from the previous h264 nal handling.

Fixes trac #5529
2026-04-20 18:28:00 +08:00
openvela-robot a27785d570 tools: Port to codec parameters API 2026-04-20 18:27:57 +08:00
openvela-robot d1e74fb8fa avcodec/iff: fix artifacts with uncompressed ham ANIMs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:27:54 +08:00
openvela-robot 4a5bcb39c1 hwcontext: add a dxva2 implementation 2026-04-20 18:27:52 +08:00
openvela-robot e2ae58aa7a ffmpeg: Check that r_frame_rate is set before attempting to use it
Avoids unexpected occurance and dependency on NaN behavior and divisions by 0

Testcase: fate-lavf-fate-avi_cram

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:27:48 +08:00
openvela-robot 3394ade808 avpacket: fix setting AVPacket.data in av_packet_ref()
The data field does not necessarily point to the beginning of the
underlying AVBuffer.

CC: libav-stable@libav.org
2026-04-20 18:27:45 +08:00
openvela-robot ffcb491d53 swresample/arm: add ff_resample_common_apply_filter_{x4,x8}_{float,s16}_neon 2026-04-20 18:27:41 +08:00
openvela-robot 01f32067af Split global .gitignore file into per-directory files 2026-04-20 18:27:38 +08:00
openvela-robot 8f19e0b43f avcodec/nvenc: Write buffPeriod/picTime SEI in both CBR modes 2026-04-20 18:27:10 +08:00
openvela-robot 22a58e143c Reduce the scope of some variables
This avoids unused variable warnings after the next version bump.
Also drop a trace level av_log() call that is in the way.
2026-04-20 18:27:07 +08:00
openvela-robot 6bd7066bd5 vf_colorspace: add floyd-steinberg dithering option to full conversion. 2026-04-20 18:26:54 +08:00
openvela-robot 2e4d1927c6 simple_idct_template: Fix strict aliasing violation
This fixes fate-wmv8-intrax8 in certain configurations, e.g.
gcc 4.4.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:26:47 +08:00
openvela-robot e26ea32be7 lavd/avfoundation: use AVCodecParameters
Fixes "Could not find codec parameters for stream" error (#5494)

Signed-off-by: Rick Kern <kernrj@gmail.com>
2026-04-20 18:26:04 +08:00
openvela-robot 64cc4c60e2 configure: Document --enable-libfontconfig 2026-04-20 18:26:01 +08:00
openvela-robot a7893933ba avcodec/hevc_parser: fix packet_split function name
Fixes compilation of hevc_parser without hevc_decoder

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 18:25:58 +08:00
openvela-robot 0e2b8d7d70 vf_frei0r: Drop overly verbose and broken debug output 2026-04-20 18:25:55 +08:00
openvela-robot 7038d20a39 lavc/videotoolboxenc: Use shared pixel buffer pool
This reduces the chance of a memcpy in the media server.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2026-04-20 18:25:51 +08:00
openvela-robot 48a75b93c8 Remove unnecessary get_bits.h #includes and add missing headers where needed.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2026-04-20 18:25:48 +08:00
openvela-robot 2409295764 avcodec/h264: Put the removed SPS handling code back
reverts one hunk from 7966ddfc0b
The new code from 7966ddfc0b only covers extradata based SPS

Fixes: ffplay -ss 13 58af5798-fa2c-42a2-997d-dc8e49de2d8a.flv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:25:44 +08:00
openvela-robot e079a26f9e Drop pointless assert.h #includes 2026-04-20 18:25:41 +08:00
openvela-robot d1f22d9cb0 wmalossless: allow calling madd_int16
This is done by actually handling the "prev_values" in the cascaded LMS data
as if it were int16_t, thus requiring switching at various locations the
computations.
2026-04-20 18:25:16 +08:00
openvela-robot 9bf34ac9e1 mpegts: Validate the SL Packet Header Configuration
timeStampLength, OCRLength and AU_Length have well specified upper
boundaries.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:25:14 +08:00
openvela-robot e95d840953 avformat: add Wideband Single-bit Data (WSD) demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:25:08 +08:00
openvela-robot 9d71b57864 Revert "mmaldec: autodetect by default" since it breaks linking on systems without mmal libraries
This reverts commit 33ac77e850.
2026-04-20 18:25:05 +08:00
openvela-robot dd986721bc configure: Add pixelutils dependency for framerate filter. 2026-04-20 18:25:02 +08:00
openvela-robot 4e9fc63332 testprogs: Mark some tables as static const 2026-04-20 18:24:59 +08:00
openvela-robot fd587ff42d qsv: Fix wrong ticks_per_frame for H.264
For H.264 stream ticks_per_frame should be 2, as per the docs.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2026-04-20 18:24:44 +08:00
openvela-robot 167d41ac95 fate: Add test for MSS1 2026-04-20 18:24:41 +08:00
openvela-robot 8a17dbc855 avcodec/h264: Only recover from reference pictures
Fixes spec compliance
Fixes Ticket5346

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:24:38 +08:00
openvela-robot 23c8323b80 dds: Drop gray-alpha swapping
The original sample was generated with invalid software.
2026-04-20 18:24:35 +08:00
openvela-robot 5e45539259 avformat/mux: Check that deinit is set before calling it
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:24:11 +08:00
openvela-robot 2559582ff8 h264_parser: switch to h2645_parse for NAL unescaping
Remove now unused ff_h264_decode_nal().
2026-04-20 18:24:06 +08:00
openvela-robot 3313014da7 fate: Add test for ticket 1833 (Ogg/Vorbis Chapters)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:23:42 +08:00
openvela-robot 8c830e61a3 ape: Avoid undefined behaviour
Avoid the clang warning

"warning: shifting a negative signed value is undefined"
2026-04-20 18:23:39 +08:00
openvela-robot 60b59a3639 Merge commit '564b4591bbe223bdc5f36a1131eaef103f23f5d0'
* commit '564b4591bbe223bdc5f36a1131eaef103f23f5d0':
  opt: Add av_opt_copy()

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2026-04-20 18:23:36 +08:00
openvela-robot 9570f3ce35 libxvid: Create extradata in init using a dummy frame
Modifying global header extradata in encode_frame is an API violation
and only happens to work currently because mov writes its header
at the end of the file.

Heavily based off of a patch from 2012 by Nicolas George.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 18:23:33 +08:00
openvela-robot 9e0b7ea045 Merge commit '933dec0e29ec4d2cb83474279a6c52d62fdb7310'
* commit '933dec0e29ec4d2cb83474279a6c52d62fdb7310':
  file: Add an option for following a file that is being written

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2026-04-20 18:23:29 +08:00
openvela-robot 62edc67c52 Generate the lists of enabled protocols/bsfs from configure. 2026-04-20 18:23:26 +08:00
openvela-robot af081762ca lavfi/af_hdcd: Implement high definition audio cd filtering.
Fixes ticket #4441.
2026-04-20 18:22:57 +08:00
openvela-robot 759c15b670 vaapi_encode: Refactor slightly to allow easier setting of global options
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 18:22:54 +08:00
openvela-robot 74a6f35028 Merge commit 'ba357e98691ee4fe1a503b8830c0050be4127475'
* commit 'ba357e98691ee4fe1a503b8830c0050be4127475':
  avprobe: switch to codecpar

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2026-04-20 18:21:57 +08:00
openvela-robot 008d138620 libavcodec: Add H264/MPEG4 encoders based on OpenMAX IL
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:21:54 +08:00
openvela-robot f992e73fe7 Merge commit '9897d9f4e074cdc6c7f2409885ddefe300f18dc7'
* commit '9897d9f4e074cdc6c7f2409885ddefe300f18dc7':
  examples/output: convert to codecpar

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2026-04-20 18:21:33 +08:00
openvela-robot 5bd9acde3c testprogs: Add missing libm.h includes
This fixes building on MSVC 2010 and 2012 after d12b5b2f13.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 18:21:30 +08:00
openvela-robot 060f2fdc0b doc/filters: add drawtext example
Show example which draws text at a random position, and switches positions every 30 seconds

Signed-off-by: Mulvya <mulvya@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2026-04-20 18:21:20 +08:00
openvela-robot 40e64ae10a configure: cosmetics: Drop pointless end-of-line semicolons 2026-04-20 18:21:17 +08:00
openvela-robot 8756340650 avformat: add aix demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2026-04-20 18:21:14 +08:00
openvela-robot 6c2461cd1d dds: Simplify postprocessing check 2026-04-20 18:21:11 +08:00
openvela-robot 8759c12d0d libavcodec/exr : cosmetic change 2026-04-20 18:21:07 +08:00
openvela-robot d6ccb983aa nvenc_h264: Fix name of private AVClass 2026-04-20 18:21:04 +08:00
openvela-robot a68a4a0559 AAC encoder: fix initialization of minsf
In some situations (exactly zeroed DC coeffs) minsf would
be initialized with garbage
2026-04-20 18:21:01 +08:00
openvela-robot 6ab56b1155 matroska: Write the field order information
And bump the document version to 4.
2026-04-20 18:20:58 +08:00
openvela-robot 5ced599705 lavu: improve documentation of some AVFrame functions 2026-04-20 18:20:52 +08:00
openvela-robot 8bf53e94f7 avconv: Drop an unused variable 2026-04-20 18:20:49 +08:00
openvela-robot 3bf4824d7c swscale: Deprecate vector functions which are unused outside swscale
There are no known users of these functions within debian
It should be thus possible to remove these functions without recommandition of a
replacement

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:20:30 +08:00
openvela-robot 9e074568c1 matroska: Support interlaced content correctly
The matroska specification now has two elements for it.
2026-04-20 18:20:28 +08:00
openvela-robot 9567643710 fate: Add filter-metadata-cropdetect
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 18:20:24 +08:00
openvela-robot 0a365928c9 h264: Add missing ff_ prefix to internally visible h264_init_dequant_tables() 2026-04-20 18:20:22 +08:00
openvela-robot 8cee2b3979 avcodec/nvenc: Generate AUD NAL units for better compatiblity 2026-04-20 18:20:18 +08:00