Commit Graph

4916 Commits

Author SHA1 Message Date
openvela-robot 2fd9a12f1e bluelet: a2dp sbc packed use common loas header
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2026-04-20 20:54:33 +08:00
Michael Niedermayer 2a905c35ea avcodec/avcodec: Warn about data returned from get_buffer*()
Text based on suggestion by: epirat07@gmail.com
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:54:28 +08:00
openvela-robot 1d041c3641 lavc/ffv1dec: drop code handling AV_PIX_FMT_FLAG_PAL
No paletted pixel formats are supported by the decoder.
2026-04-20 20:54:16 +08:00
openvela-robot 9f66569110 FFMPEG: Fix in offload mode,playing opus error after playing aac
bsf is not released after aac playback

Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:54:13 +08:00
Lynne 14972319e0 libavutil: deprecate the old Vulkan queue API, add doc/APIchanges entries 2026-04-20 20:54:09 +08:00
openvela-robot f55ff7b165 add tools/target_swr_fuzzer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:54:04 +08:00
openvela-robot 8f8fb0467b FFMPEG: use offload_tlv bitsream filter in nuttx_enc.c
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:53:54 +08:00
Rémi Denis-Courmont 9d7072954d lavu/cpu: deprecate RISC-V F, D and zba CPU flags 2026-04-20 20:53:51 +08:00
openvela-robot 1456086879 lavfi/framesync: avoid forcing frame writability unnecessarily
Callers of ff_framesync_get_frame() generally do not expect the result
to be writable, those that do (e.g. ff_framesync_dualinput_get_writable())
ensure writability themselves.

Significantly reduces memory consumption in complex graphs with
framesync-based filters (e.g. scale, ssim).

Reported-By: Mark Shwartzman
2026-04-20 20:53:45 +08:00
openvela-robot 07d258c51b FFMPEG: adevsrc forward get_options instead of process
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:53:41 +08:00
James Almer 7b73cc014d avutil/intreadwrite: add missing aligned read/write macros
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:53:37 +08:00
openvela-robot 76cd52cdd4 avcodec/decode: remove unused argument from ff_frame_new_side_data_from_buf()
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:53:36 +08:00
openvela-robot 380e1eb181 Fix logic infinite loop code
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2026-04-20 20:53:33 +08:00
Niklas Haas 2675ffef40 avutil/dovi_meta: add dv_md_compression to cfg record
This field is used to signal the compression method in use.
2026-04-20 20:53:29 +08:00
Rémi Denis-Courmont 6a7fb9f7d1 lavu/riscv: add CPU flag for B bit manipulations
The B extension was finally ratified in May 2024, encompassing:
- Zba (addresses),
- Zbb (basics) and
- Zbs (single bits).
It does not include Zbc (base-2 polynomials).
2026-04-20 20:53:28 +08:00
openvela-robot c012a6159e avdevice/dshow: Don't skip audio devices if no video device is present
The search of the current DirectShow device list has been customized so
that audio devices are always found even if no video device is connected.

Signed-off-by: Jens Frederich <jens.frederich@vector.com>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:53:26 +08:00
openvela-robot 6cb6502d95 FFMPEG: Offload recording using the correct sample format
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:53:23 +08:00
openvela-robot b3cf4272ba fftools/ffmpeg: prefer real errors over EOF in err_merge()
Fixes an issue in 6.1 when reading a corrupted file with -xerror would
exit with success. This specific issue is not present in master, but
this should generally be a more robust behaviour.

Reported-by: Andrej Peterka
2026-04-20 20:53:19 +08:00
openvela-robot 35392275a8 FFMPEG: asink_adevsink filter get_options memory leak
param memory is not free

Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:53:16 +08:00
openvela-robot fe73da4f64 doc/filters: fix outpad labels in libvmaf_cuda example 2026-04-20 20:53:11 +08:00
openvela-robot 2a6b2c9e13 FFmpeg: asrc_adevsrc filter get_options memory leak
dict memory is not free

Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:53:07 +08:00
openvela-robot 85db2296ee avcodec/vvc: Remove NOP condition check in alf_filter_luma
If (y + i == vb_above) or (y + i == vb_below), the if body has no
operation.
2026-04-20 20:52:59 +08:00
openvela-robot c73a2d1e94 ffmpeg: Add paused to replace underflow logic
During playback, after sending the pause command, when the resume
command is sent again, if the 96K buffer is in the media layer, the
media will continue to fill the buffer until the 96K is full, then it
will enqueue the buffer and send resume when underflow is true. However,
the driver has received the pause command before and stopped data
consumption. It will not notify the media layer when there is underrun,
so underflow is false and the resume command will not be sent to the
driver, resulting in playback pause. To solve this problem, add pause to
replace underflow, and issue the resume command based on the judgment
of pause and dq_count=0.

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2026-04-20 20:52:55 +08:00
openvela-robot 97c1543dbf avfilter/vf_scale: fix frame lifetimes
scale_frame() inconsistently handled the lifetime of `in`. Fixes a
possible double free and a possible memory leak.

The new code always has `scale_frame` take over ownership of the input
frame. I first tried writing this code in a way where the calling code
retains ownership, but this is nontrivial due to the presence of the
no-op short-circuit condition in which the input frame is directly
returned. (As an alternative, we could use av_frame_clone() instead, but
I wanted to avoid touching the original behavior in this commit)
2026-04-20 20:52:42 +08:00
openvela-robot 74d69ed903 ffmpeg:apply func return value because of code check
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 20:52:38 +08:00
Anton Khirnov fc41814aab lavf: deprecate avformat_transfer_internal_stream_timing_info()
And av_stream_get_codec_timebase().

They were both added for ffmpeg CLI, which no longer calls either of
them. Furthermore the notion of "internal stream timing info" that needs
to be transferred with a special magic API function is fundamentally
flawed and should be removed.
2026-04-20 20:52:36 +08:00
openvela-robot 55479ce52c fftools/ffmpeg_dec: improve detection of lavf-guessed durations
Will be useful in following commit.
2026-04-20 20:52:35 +08:00
openvela-robot d28421c90e FFMPEG: expand mq maxmsg to 16
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 20:52:26 +08:00
James Almer 764f915756 avcodec/packet: add a decoded frame cropping side data type
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:52:20 +08:00
Derek Buitenhuis 158bbad72b avformat: Add a new stream disposition for multilayer video
This lets us detect when a container has flagged a stream as multilayer.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 20:52:17 +08:00
openvela-robot f22fadc714 avformat/dump: only print yaw, pitch, and roll if set
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:52:14 +08:00
openvela-robot dd9c922b71 FFMPEG: Optimize ff_nuttx_drain_buffer
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:52:10 +08:00
openvela-robot 4994c9941f tests/fate/filter-audio.mak: add test for atempo audio filter
Signed-off-by: Rajiv Harlalka <rajivharlalka009@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 20:52:05 +08:00
openvela-robot f870472bab FFMPEG: Fix always enqueue buffer to the driver when paused
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:52:01 +08:00
Tong Wu d94efdf734 avutil/hwcontext_d3d12va: add Flags for resource creation
Flags field is added to support diffferent resource creation.

Signed-off-by: Tong Wu <tong1.wu@intel.com>
2026-04-20 20:51:56 +08:00
James Almer 195a6b2831 avutil/stereo3d: add a Stereo3D view to signal that the view is unspecified
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:51:53 +08:00
openvela-robot 5bc46fad3f avcodec/vvcdec: Fix compiling with MSVC 2022 17.8 and older
Versions of MSVC older than 17.9 error out here with the following
error:

    src/libavcodec/vvc/filter.c(815): error C2059: syntax error: '}'
    src/libavcodec/vvc/filter.c(832): error C2065: 'all_zero_bs': undeclared identifier
    src/libavcodec/vvc/filter.c(836): error C2065: 'all_zero_bs': undeclared identifier

This was a regression from 5b9320b209c727ab2df3e76f77aad676f986c8e4.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:51:50 +08:00
openvela-robot 179ff56f31 FFMPEG: Enqueue the remaining data to driver when playback underflow
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:51:46 +08:00
openvela-robot 0b0dc46151 tools/target_dec_fuzzer: Adjust threshold for jpeg2000
Fixes: Timeout
Fixes: 57385/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5394334324490240

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:51:43 +08:00
openvela-robot 45b14f899c FFMPEG: clear final flag before enqueue
the final flag should be cleared before enqueue, otherwise the loop could be blocked by the final flag.

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:51:31 +08:00
James Almer fc4383f61b avutil/stereo3d: add a new allocator function that returns a size
av_stereo3d_alloc() is not useful in scenarios where you need to know the
runtime size of AVStereo3D.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:51:26 +08:00
Cosmin Stejerean 620f8c66be avutil/dovi_meta: add fields for ext_mapping_idc
Co-authored-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:51:24 +08:00
openvela-robot 0986b39270 MAINTAINERS: Update the entries for the release maintainer for FFmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:51:15 +08:00
openvela-robot 328953e3c5 ffmpeg:fix build warning in sim/m64
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 20:51:11 +08:00
Derek Buitenhuis 8a9509ea18 avutil/stereo3d: Fill out stereo info provided by Vision Pro files
Based on what is in the files themselves, and what the API provides
to users.

URLs:
  * https://developer.apple.com/documentation/videotoolbox/kvtcompressionpropertykey_heroeye
  * https://developer.apple.com/documentation/videotoolbox/kvtcompressionpropertykey_stereocamerabaseline
  * https://developer.apple.com/documentation/videotoolbox/kvtcompressionpropertykey_horizontaldisparityadjustment
  * https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_horizontalfieldofview

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2026-04-20 20:51:07 +08:00
Derek Buitenhuis 9cf9dd641e avutil/spherical: Add more spherical types
These originate from the Apple Vision Pro, and are documented here:

    https://developer.apple.com/documentation/coremedia/cmprojectiontype

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2026-04-20 20:51:07 +08:00
James Almer fb13c4545f avutil: rename av_mod_uintp2 to av_zero_extend
It's more descriptive of what it does.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:51:05 +08:00
Lynne a711dab81a lavc: bump minor and add APIchanges entry for new USAC profile 2026-04-20 20:50:45 +08:00
openvela-robot 333b84b8d1 avcodec/h265_metadata: Add options to set width/height after crop
It's a common usecase to request a video size after crop. Before
this patch, user must know the video size before crop, then set
crop_right/crop_bottom accordingly. Since HEVC can have different
CTU size, it's not easy to get/deduce the video size before crop.
With the new width/height options, there is no such requirement.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-04-20 20:50:43 +08:00
openvela-robot ee91b60ce0 audio:add nuttx_enc lastpkt for count latency
add nuttx_enc lastpkt for count latency

Signed-off-by: shipei <shipei@xiaomi.com>
2026-04-20 20:50:39 +08:00
openvela-robot 4c0f0ba0fb libavcodec/libxvid: code cleanup (replace magic numbers) 2026-04-20 20:50:36 +08:00
openvela-robot 09c5d5b854 FFMPEG: Fix the inaccurate pts value of offload recorder
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:50:32 +08:00
Lynne ae37357edc lavu: bump minor and add APIchanges entries for the new channel positions 2026-04-20 20:50:26 +08:00
openvela-robot 7b5d8cac3a libavcode/x86/vvc: change label to vvc_sad_16 to reflect block sizes
According to the VVC specification (section 8.5.1), the maximum width/height of a subblock passed for DMVR SAD is 16. This along with previous constraint requiring width * height >= 128 means that  8x16, 16x8, and 16x16 are the only allowed sizes. This re-labels vvc_sad_16_128 to vvc_sad_16 to reflect this and adds a comment about the block size constraints. There's no functionality change.
2026-04-20 20:50:15 +08:00
openvela-robot a9bd2a22c2 FFMPEG: Support opus offload encoding
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:50:03 +08:00
James Almer f6f486fe63 avutil/channel_layout: add a helper function to get the ambisonic order of a layout
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:49:55 +08:00
Haihao Xiang bd5971c4ef lavu/hwcontext_qsv: update AVQSVFramesContext to support dynamic frame pool
Add AVQSVFramesContext.info and update the description.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2026-04-20 20:49:48 +08:00
openvela-robot a6d0ac50e3 lavc/vc1dsp: R-V V mspel_pixels
C908 X60
vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_c            :  14.7 13.2
vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_rvv_i32      :   2.5  2.2
vc1dsp.avg_vc1_mspel_pixels_tab[1][0]_c            :   3.7  3.5
vc1dsp.avg_vc1_mspel_pixels_tab[1][0]_rvv_i64      :   1.0  1.2
vc1dsp.put_vc1_mspel_pixels_tab[0][0]_c            :   9.0  8.0
vc1dsp.put_vc1_mspel_pixels_tab[0][0]_rvi          :   1.0  1.0
vc1dsp.put_vc1_mspel_pixels_tab[1][0]_c            :   2.5  2.2
vc1dsp.put_vc1_mspel_pixels_tab[1][0]_rvi          :   0.5  0.5

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2026-04-20 20:49:43 +08:00
openvela-robot 4253848f6b FFMPEG: add dsp reboot event notify
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 20:49:40 +08:00
openvela-robot a0557ef6a5 lavc/flacdsp: fix CPU requirement for 32-bit LPC 2026-04-20 20:49:36 +08:00
openvela-robot 34879f9974 bluelet: reset 'available' flag when audio path re-setup, avoid this flag is unknown
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 20:49:32 +08:00
openvela-robot dcf5811164 aacdec: restore arm32 dequantization optimizations
Unintentionally removed as part of 03cf10164578aed33f4d0cb5b69d63669c01a538.
Untested, but its assumed that unlike most of the old ARM code,
this one was still working.
2026-04-20 20:49:26 +08:00
openvela-robot b2154224c5 FFMPEG: add caller context for avfilter-graph-reconfig.
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:49:19 +08:00
Rémi Denis-Courmont 4dc6f92760 riscv: add Zvbb vector bit manipulation extension 2026-04-20 20:49:15 +08:00
openvela-robot c92e82adc1 lavc/vaapi_encode_av1: implement write_extra_header callback
This can be used to insert a metadata OBU to the stream later.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2026-04-20 20:49:14 +08:00
openvela-robot ab3d02e4d0 FFMPEG: add additonal start for short data
When using offload path to play short audio, if the audio data cannot fill the buffer, it may not enter the start branch, so we need to start playing after draining the buffer.

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:49:10 +08:00
openvela-robot 9acee1cbfc avfilter/af_volume: Don't free options manually
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:49:06 +08:00
openvela-robot 81c68ca475 FFmpeg: bluelet muxer output poll_available duration for debug
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2026-04-20 20:49:02 +08:00
openvela-robot b405181bc9 lavu/riscv: fix build without <sys/hwprobe.h> 2026-04-20 20:48:58 +08:00
openvela-robot c22c375228 FFMPEG: add offload volume control
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:48:54 +08:00
openvela-robot e32eca295c avformat/file: fail for non-numerical arguments to pipe:
Before this patch, the implementation of pipe: inputs/outputs would
silently fall back to stdin/stdout for any argument not successfully
parsed by strtol().

This patch introduces an explicit error for any non-numerical arguments,
which should avoid user confusion as in #10977.

New behavior:

$ cat /tmp/video.mkv | ./ffmpeg -i pipe:aa -acodec copy -vcodec copy -f matroska pipe:1 | cat >/tmp/out.mkv

[pipe @ 0x5618c7bcf740] Non-numerical argument "aa" to pipe:
[in#0 @ 0x5618c7bced00] Error opening input: Invalid argument
Error opening input file pipe:aa.
Error opening input files: Invalid argument

Based on the patch of Nils Goroll <nils.goroll@uplex.de>.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 20:48:49 +08:00
openvela-robot dcb122c263 FFMPEG: change underflow log level from info to warning
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:48:45 +08:00
James Almer 44170e5f2e avutil/opt: add an unsigned option type
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:48:39 +08:00
openvela-robot 12df655bb3 avformat/mov: support SpatialAudioBox ambisonic layouts with arbitrary channel mapping
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:48:35 +08:00
openvela-robot 1bef6d7103 FFMPEG: adjust ioctrl sequence RESUME after ENQUEUE
Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2026-04-20 20:48:31 +08:00
James Almer e771d35fe4 doc/APIchanges: fix date for the latest entry
And add the commit hash while at it.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:48:25 +08:00
James Almer 2ea5463d04 avutil/opt: add support for children objects in av_opt_serialize
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:48:24 +08:00
James Almer 2f16e2d861 avcodec/hevcdec: export global side data in AVCodecContext
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:47:56 +08:00
James Almer 9954696a9e avutil/mastering_display_metadata: add a new allocator function that returns a size
av_mastering_display_metadata_alloc() is not useful in scenarios where you need to
know the runtime size of AVMasteringDisplayMetadata.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:47:56 +08:00
James Almer e2988430fa avutil/version: bump minor after recent AVFrame API additions
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:47:56 +08:00
openvela-robot f61d8b5e47 avcodec/huffyuvdec: Don't zero unnecessarily
A decoder's private data has already been zeroed (apart from options)
before init is called.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:47:42 +08:00
openvela-robot 519c62b47c FFMPEG: switched to ch_layout for adevsink.
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:47:36 +08:00
Jan Ekström 238bcdec31 avutil/pix{desc,fmt}: add new matrix coefficients from H.273 v3
* SMPTE ST 2128 IPT-C2 defines the coefficients utilized in DoVi
  Profile 5. Profile 5 can thus now be represented in VUI as
  {AVCOL_RANGE_JPEG, AVCOL_PRI_BT2020, AVCOL_TRC_SMPTE2084,
   AVCOL_SPC_IPT_C2, AVCHROMA_LOC_LEFT} (although other chroma
  sample locations are allowed). AVCOL_TRC_SMPTE2084 should in
  this case be interpreted as 'PQ with reshaping'.
* YCgCo-Re and YCgCo-Ro define the bitexact YCgCo-R, where the
  number of bits added to a source RGB bit depth is 2 (i.e., even)
  and 1 (i.e., odd), respectively.
2026-04-20 20:47:26 +08:00
Niklas Haas c15fb26eae avutil/dovi_meta: add dolby vision extension blocks
As well as accessors plus a function for allocating this struct with
extension blocks,

Definitions generously taken from quietvoid/dovi_tool, which is
assembled as a collection of various patent fragments, as well as output
by the official Dolby Vision bitstream verifier tool.
2026-04-20 20:47:24 +08:00
quietvoid 12607606dc avutil/dovi_meta: add AVDOVIDataMapping.nlq_pivots
The NLQ pivots are not documented but should be present in the header
for profile 7 RPU format. It has been verified using Dolby's
verification toolkit.

Signed-off-by: quietvoid <tcChlisop0@gmail.com>
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:47:24 +08:00
Nicolas Gaullier a1a57dbe5b avformat/demux: add duration_probesize AVOption
Yet another probesize used to get the durations when
estimate_timings_from_pts is required. It is aimed at users interested
in better durations probing for itself, or because using
avformat_find_stream_info indirectly and requiring exact values: for
concatdec for example, especially if streamcopying above it.
The current code is a performance trade-off that can fail to get video
stream durations in a scenario with high bitrates and buffering for
files ending cleanly (as opposed to live captures): the physical gap
between the last video packet and the last audio packet is very high in
such a case.

Default behaviour is unchanged: 250k up to 250k << 6 (step by step).
Setting this new option has two effects:
- override the maximum probesize (currently 250k << 6)
- reduce the number of steps to 1 instead of 6, this is to avoid
detecting the audio "too early" and failing to reach a video packet.
Even if a single audio stream duration is found but not the other
audio/video stream durations, there will be a retry, so at the end the
full user-overriden probesize will be used as expected by the user.

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
2026-04-20 20:47:22 +08:00
openvela-robot 4c77c353f0 avformat/mov: simplify the entry count overflow check in the keys atom
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:47:19 +08:00
openvela-robot 0aa2c85b42 FFMPEG: add log when enqueue eos buffer
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:47:15 +08:00
Anton Khirnov 6f81e5f2f6 lavu/frame: add side data descriptors
They allow exporting extended information about side data types.
2026-04-20 20:47:02 +08:00
Michael Niedermayer e2e3665721 doc/APIchanges: Add 7.0 cut point
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:47:02 +08:00
Michael Niedermayer 56102fd6ab doc/APIchange: Fill in some missing thingss
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:47:01 +08:00
Marton Balint 74c40bed7a avutil/timestamp: introduce av_ts_make_time_string2 for better precision
av_ts_make_time_string() used "%.6g" format, but this format was losing
precision even when the timestamp to be printed was not that large. For example
for 3 hours (10800) seconds, only 1 decimal digit was printed, which made this
format inaccurate when it was used in e.g. the silencedetect filter. Other
detection filters printing timestamps had similar issues. Also time base
parameter of the function was *AVRational instead of AVRational.

Resolve these problems by introducing a new function, av_ts_make_time_string2().

We change the used format to "%.*f", use a precision of 6, except when printing
values near 0, in which case we calculate the precision dynamically to aim for
a similar precision in normal form as with %.6g.  No longer using scientific
representation can make parsing the timestamp easier for the users, we can
safely do this because the theoretical maximum of INT64_MAX*INT32_MAX still
fits into the string buffer in normal form.

We somewhat imitate %g by trimming ending zeroes and the potential decimal
point characters. In order not to trim "inf" as well, we assume that the
decimal point string does not contain the letter "f". Note that depending on
printf %f implementation, we might trim "infinity" to "inf".

Thanks for Allan Cady for bringing up this issue.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 20:46:54 +08:00
openvela-robot 22b4dd2b39 avutil/hwcontext_qsv: Fix mixed declaration and code
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:46:53 +08:00
openvela-robot 7eb5d0d0c3 ffmpeg: do not reset codec config for A2DP stream when audio stopped.
Signed-off-by: gaozihao <gaozihao@xiaomi.com>
2026-04-20 20:46:49 +08:00
Niklas Haas 2d35c6838e avutil/film_grain_params: add av_film_grain_params_select()
Common utility function that can be used by all codecs to select the
right (any valid) film grain parameter set. In particular, this is
useful for AFGS1, which has support for multiple parameters.

However, it also performs parameter validation for H274.
2026-04-20 20:46:44 +08:00
Niklas Haas 478ea3afb1 avutil/film_grain_params: add metadata to common struct
This is needed for AV1 film grain as well, when using AFGS1 streams.
Also add extra width/height and subsampling information, which AFGS1
cares about, as part of the same API bump. (And in principle, H274
should also expose this information, since it is needed downstream to
correctly adjust the chroma grain frequency to the subsampling ratio)

Deprecate the equivalent H274-exclusive fields. To avoid breaking ABI,
add the new fields after the union; but with enough of a paper trail to
hopefully re-order them on the next bump.
2026-04-20 20:46:43 +08:00
Matthieu Bouron fd37e1b16a avcodec: add av_jni_{get,set}_android_app_ctx() helpers
This will allow users to pass the Android ApplicationContext which is mandatory
to retrieve the ContentResolver responsible to resolve/open Android content URIS.
2026-04-20 20:46:42 +08:00
Andreas Rheinhardt bdeb7fdd9f avutil/frame: Rename av_frame_side_data_get and add wrapper for it
av_frame_side_data_get() has a const AVFrameSideData * const *sd
parameter; so calling it with an AVFramesSideData **sd like
AVCodecContext.decoded_side_data (or with a AVFramesSideData * const
*sd) is safe, but the conversion is not performed automatically
in C. All users of this function therefore resort to a cast.

This commit changes this: av_frame_side_data_get() is renamed
to av_frame_side_data_get_c(); furthermore, a static inline
wrapper for it name av_frame_side_data_get() is added
that accepts an AVFramesSideData * const * and converts this
to const AVFramesSideData * const * in a Wcast-qual safe way.

This also allows to remove the casts from the current users.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:46:41 +08:00
Andreas Rheinhardt a017ff7d94 avutil/frame: Constify av_frame_side_data_get()
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:46:40 +08:00
Jan Ekström d0035ea8e0 avcodec: add frame side data array to AVCodecContext
This allows configuring an encoder by using AVFrameSideData.
2026-04-20 20:46:38 +08:00