Commit Graph

3323 Commits

Author SHA1 Message Date
openvela-robot 6a58a564dc avformat/mpegts: add a ts_id exported option
It will replace AVFormatContext.ts_id in the coming bump.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:44:49 +08:00
openvela-robot 3af83178c9 FFMPEG: unref last_pkt before flush to avoid ENQUEUE after FLUSH
Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2026-04-20 20:44:46 +08:00
openvela-robot 7f54c8e608 .mailmap: update my mailmap entry 2026-04-20 20:44:28 +08:00
openvela-robot e15ef0bb20 FFMPEG: audio offload device completed.
dependson:3767211

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:44:24 +08:00
openvela-robot edd6535005 avcodec/aac_defines: Remove unused AAC_RENAME_32
Unused since fbe6a51b11e20c5dfe076877f02d2bbb2300005d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:44:15 +08:00
openvela-robot 521c0b3a62 ffmpeg: display fds in dump message.
Signed-off-by: jihandong <jihandong@xiaomi.com>
2026-04-20 20:44:11 +08:00
openvela-robot 1ed4bb4229 lavc: move bitstream filters into bsf/ subdir 2026-04-20 20:44:05 +08:00
openvela-robot 85cab6323e ffmpeg: add dequeue time log for libavdevice/nuttx.c
Signed-off-by: liuwei35 <liuwei35@xiaomi.com>
2026-04-20 20:44:01 +08:00
openvela-robot b695919241 avformat/mxfenc: remove unused variables
Produces a -Wunused-variables warning with -Wall.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2026-04-20 20:43:57 +08:00
openvela-robot 3d07f112d6 FFMPEG: rename flush_buffer to drain_buffer.
drain_buffer means all data in buffer push to driver.
flush_buffer means discard data.

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:43:44 +08:00
openvela-robot 81e553beff configure: Enable section_data_rel_ro for FreeBSD and NetBSD aarch64 / arm
Fixes the build. It's a requirement when utilizing PIE.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:43:12 +08:00
openvela-robot 77cf539bac libavdevice/nuttx: Continue ff_nuttx_write_data if nuttx_write_lastpacket return success
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 20:43:08 +08:00
openvela-robot 9aafe74e04 avcodec/mediacodecenc: set quality in cq mode
From AOSP doc, these values are device and codec specific, but lower
values generally result in more efficient (smaller-sized) encoding.

For example, global_quality 50 on Pixel 6 results a 1080P 30 FPS
HEVC with 3744 kb/s, while global_quality 80 results 28178 kb/s.

Fix #10689

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-04-20 20:42:58 +08:00
openvela-robot a09786d4e7 libavdevice/nuttx: Remove the internal argument from ff_nuttx_close and ff_nuttx_poll_available
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 20:42:54 +08:00
openvela-robot 1af89cd12b checkasm: Remove unnecessary const on scalar parameters
The ffmpeg coding style doesn't usually use const on scalar
parameters (or on the pointer values - as opposed to the type
that is pointed to, where it has a semantic meaning), contrary
to the dav1d coding style (where this was imported from).

This avoids warnings about differences in the type signatures
between declaration and definition of this function, with older
versions of MSVC.

The issue was observed with one version of MSVC 2017,
19.16.27024.1, with warnings like these:

    src/tests/checkasm/checkasm.c(969): warning C4028: formal parameter 3 different from declaration

The warning itself is bogus as the const here is harmless, and
newer versions of MSVC no longer warn about this.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:42:50 +08:00
openvela-robot 6dd0283a39 FFMPEG: optimzied seek from videosink.
VELAPLATFO-20277:VELAPLATFO-10349

Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:42:47 +08:00
openvela-robot 0001fb3aab swr/swresample: avoid reapplication of firstpts
During a resampling operation where

1) user has specified first_pts
2) SWR_FLAG_RESAMPLE is not set initially (directly or otherwise)
3) first_pts has been fulfilled (always using hard compensation)

then upon first encountering a delay where a soft compensation is
required, swr_set_compensation will lead to another init of swr which
will reset outpts to the specified firstpts thus leading to an output
frame having its pts = firstpts. When the next input frame is received,
swr will see a large delay and inject silence from firstpts to the
current frame's pts. This can lead to severe desync and in worst case,
loss of audio playback.

Parameter firstpts initialized to AV_NOPTS_VALUE in swr_alloc and then
checked in swr_init to avoid resetting outpts, thus avoiding reapplication
of firstpts.

Fixes #4131.
2026-04-20 20:42:42 +08:00
openvela-robot 86e9ddf140 libavdevice/nuttx: Remove the forward declaration of nuttx_cap_class
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 20:42:39 +08:00
openvela-robot 126fd3df8e fftools/ffmpeg_mux: stop logging to AVFormatContext
Only the muxer itself is supposed to do that. Log to OutputStream
instead.

Drop now-redundant information from the logged string.
2026-04-20 20:42:35 +08:00
openvela-robot 23f9283d04 libavdevice/nuttx: Move playback flag from ff_nuttx_open to ff_nuttx_init
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 20:42:32 +08:00
openvela-robot e1b856790e fftools/ffmpeg_filter: move FilterGraph.graph to FilterGraphThread
The AVFilterGraph is fully owned by the filtering thread and should
never be accessed outside of it.
2026-04-20 20:42:18 +08:00
openvela-robot 6cbd503ff4 FFMPEG: optimized timestamp calc.
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:42:10 +08:00
openvela-robot 5ffef14821 lavc/vc1dsp: R-V V inv_trans
C908:
vc1dsp.vc1_inv_trans_4x4_dc_c:      125.7
vc1dsp.vc1_inv_trans_4x4_dc_rvv_i32: 53.5
vc1dsp.vc1_inv_trans_4x8_dc_c:      230.7
vc1dsp.vc1_inv_trans_4x8_dc_rvv_i32: 65.5
vc1dsp.vc1_inv_trans_8x4_dc_c:      228.7
vc1dsp.vc1_inv_trans_8x4_dc_rvv_i64: 64.5
vc1dsp.vc1_inv_trans_8x8_dc_c:      476.5
vc1dsp.vc1_inv_trans_8x8_dc_rvv_i64: 80.2

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2026-04-20 20:42:03 +08:00
openvela-robot ba5e958295 ffmpeg: use hw field indicate samplerate
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 20:41:59 +08:00
openvela-robot 5ae183910a avfilter/framesync: fix OOM case
Fixes OOM when caller keeps adding frames into filtergraph
that reached EOF by other means, for example EOF is signalled
by other filter in filtergraph or by buffersink.
2026-04-20 20:41:51 +08:00
openvela-robot a5fb28ffe7 FFMPEG:add 12K sample rate support in nuttx
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:41:47 +08:00
openvela-robot 47f131f86b avfilter/asrc_afirsrc: fix by one smaller allocation of buffer 2026-04-20 20:41:40 +08:00
openvela-robot a48c3214c1 ffmpeg: add log when playback resume from suspend
Signed-off-by: liuwei35 <liuwei35@xiaomi.com>
2026-04-20 20:41:36 +08:00
openvela-robot 690989c4a1 x86/: clear the high bits for order in scalarproduct_and_madd functions
Should fix checkasm failures on win64.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:41:33 +08:00
openvela-robot a76e7117f5 ffmpeg:optimize get channel_layouts for asrc_adevsrc filter
optimize get channel_layouts for asrc_adevsrc filter

Signed-off-by: shipei <shipei@xiaomi.com>
2026-04-20 20:41:29 +08:00
openvela-robot e061db2212 avcodec/mediacodecdec: fix return EAGAIN after EOF
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-04-20 20:41:26 +08:00
openvela-robot 53b56210d4 ffmpeg asrc_adevsrc:optimize channel layout rule for asrc_adevsrc
optimize channel layout add rule for asrc_adevsrc,one nb_channel has more then one channle layouts

Signed-off-by: shipei <shipei@xiaomi.com>
2026-04-20 20:41:23 +08:00
openvela-robot e7c5903279 avcodec/h264dec: use BOOL for skip_gray, noref_gray
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:41:19 +08:00
openvela-robot eaca3c1a73 FFMPEG: handle av_opt_set_dict() av_opt_set_dict
CID 154902,CHECKED_RETURN

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:41:16 +08:00
openvela-robot 0f76028c57 avfilter/af_afir: add irnorm and irlink options
Deprecate gtype option.
2026-04-20 20:41:05 +08:00
openvela-robot cd39d8cf3b ffmpeg:reconfig adevsrc when bt stop audio
rootcause:leaudio would update audio config when siwtch from one audio context
to another context, then ffmpeg need reconfig codecpar

Signed-off-by: chengkai <chengkai@xiaomi.com>
2026-04-20 20:40:55 +08:00
openvela-robot 3057396fb1 checkasm/flacdsp: fix ls/rs/ms tests
decorrelate_ls, _rs and _ms are decorrelate[1], [2] and [3] respectively.
The code ended up testing indep ([0]) as twice, ms never, and misnaming
the other two.
2026-04-20 20:40:51 +08:00
openvela-robot 0bc7138ff0 FFmpeg: adevsrc - free decoder context before reconfig
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2026-04-20 20:40:48 +08:00
openvela-robot d6651992a5 lavc/exrdsp: unroll predictor
With explicit unrolling, we can skip half of the sign bit flips, and
the compiler is then better able to optimise the scalar loop:

predictor_c: 31376.0 (before)
predictor_c: 23703.0 (after)
2026-04-20 20:40:43 +08:00
openvela-robot b2b9c6a401 external/ffmpeg: free last_pkt before packet clone
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:40:39 +08:00
openvela-robot bef74ba2b0 lavc/sbrdsp: R-V V hf_gen
hf_gen_c:      2922.7
hf_gen_rvv_f32: 731.5
2026-04-20 20:40:36 +08:00
openvela-robot a1eb52566c FFMPEG: correct audio_lossless to pcm_lossless
many lossless audio format like ALAC.. but not pcm.

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:40:32 +08:00
openvela-robot 6487581f73 avfilter/avf_showcwt: add fm frequency scaler 2026-04-20 20:40:27 +08:00
openvela-robot 82ad46de1c FFMPEG: add offload capture support.
dependson:3523124

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:40:23 +08:00
openvela-robot e0334c73b6 lavc/sbrdsp: R-V V sbr_hf_g_filt
hf_g_filt_c:      1552.5
hf_g_filt_rvv_f32: 679.5
2026-04-20 20:40:17 +08:00
openvela-robot 2c90899a9d a2dp ctrl socket first POLLOUT before connection setup
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 20:40:14 +08:00
openvela-robot 5b6a01751e avutil/hwcontext_vulkan: fix memleak when device_create is skipped
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-04-20 20:39:56 +08:00
openvela-robot bd28cc34f0 ffmpeg: enable O_CLOEXEC explicit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2026-04-20 20:39:52 +08:00
openvela-robot 0969389268 avfilter/vidstab: add option for file format specification
The vidstab library added support in Nov 2020 for writing/reading
the transforms data in binary in addition to ASCII. The library default
was changed to binary format but no changes were made to the AVfilters
resulting in data file for writing or reading being always opened as text.
This effectively broke the filters.

Option added to vidstabdetect to specify file format and open files in
both filters with the correct attributes.
2026-04-20 20:39:47 +08:00
openvela-robot 6ee516abc8 ffmpeg:fix latency abnormally when driver not ready to start
if latency not inited,it is abnormally when driver not ready to start,sometime it value like: latency:30401280

Signed-off-by: shipei <shipei@xiaomi.com>
2026-04-20 20:39:44 +08:00
openvela-robot 5569e7353a hwcontext_vulkan: improve queue family init code
When users zero-init'd the struct, or left it as-is, the encode
queue family matched the graphics queue family, which led it to be
incorrectly logged as being used for encode.

This just improves the logging so this isn't printed anymore.
2026-04-20 20:39:40 +08:00
openvela-robot ea73ba2131 ffmpeg: fix coverity warning
fix resource leaks and self assignment

Signed-off-by: cenzhanquan1 <cenzhanquan1@xiaomi.com>
2026-04-20 20:39:27 +08:00
openvela-robot 4c3136857b avcodec/jpegxl_parser: fix OOB read regression
In f7ac3512f5b5cb8eb149f37300b43461d8e93af3 the size of the dynamically
allocated buffer was shrunk, but it was made too small for very small
alphabet sizes. This patch restores the size to prevent an OOB read.

Reported-by: Cole Dilorenzo <coolkingcole@gmail.com>
Signed-off-by: Leo Izen <leo.izen@gmail.com>
2026-04-20 20:39:20 +08:00
openvela-robot 24a9c5e480 FFMPEG: add strict condition to underflow.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:39:16 +08:00
openvela-robot 5a8c3218d2 avcodec/pthread_frame: Remove FF_API_SLICE_OFFSET
Since 432adca5fedcb277b9a715a723cfd40735ec58f8 no decoder
looks at the slice_count and slice_offset fields at all,
so there is no reason to synchronize them between the worker
and the user thread.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:38:41 +08:00
openvela-robot 2337dcdff9 ffmpeg:reduce query times in ff_nuttx_capbility_query_ranges
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2026-04-20 20:38:37 +08:00
openvela-robot a24195dcbf avcodec/error_resilience: Make applying decode_error_flags optional
Add a pointer parameter that if supplied will be used to return
the updated decode_error_flags. This will allow to fix several
races when using frame-threading; these resulted from AVFrame
that the earlier code updated concurrently being used as source
in an av_frame_ref() call in the decoder's update_thread_context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:38:31 +08:00
openvela-robot e5f93889b0 ffmpeg: correct function name in vsrc_devsrc and asrc_adevsrc filter
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2026-04-20 20:38:28 +08:00
openvela-robot 8168a75c47 avcodec/smcenc: remove useless cast 2026-04-20 20:38:00 +08:00
openvela-robot 24b75f6a39 ffmpeg:add le audio and a2dp audio option
Signed-off-by: chengkai <chengkai@xiaomi.com>
2026-04-20 20:37:56 +08:00
openvela-robot f6d2b5c056 avformat/matroskaenc: Fix writing of markers
When the marker writing code was merged from libav to FFmpeg
in dc62016c, it failed to take into account that the meaning of
cluster_pos had changed in bda5b662; in particular, the special
value for “I'm not currently working on a cluster” had changed
from 0 to -1. This makes the avio_write_marker() call never
be called. Update the if statement to fix it.

Fixes: Ticket9843
Signed-off-by: Steinar H. Gunderson <steinar+ffmpeg@gunderson.no>
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:37:41 +08:00
openvela-robot d45dcff4a8 ffmpeg : member access within null pointer of type 'struct AVCodecContext'
get sample_rate from inlink in place of enc_ctx.

Signed-off-by: libei1 <libei1@xiaomi.com>
2026-04-20 20:37:37 +08:00
openvela-robot b247d70780 fate/matroska: Stop using unicode in command line paramters
The fate-run.sh shell script exports LC_ALL=C before invoking the
test executables; this is probably done for consistency.

When executing Windows binaries with Wine, it normally handles
UTF-8 command line parameters just fine - but with LC_ALL set to
C, it treats them as plain ASCII.

As the unicode command line parameters wasn't the main thing
being tested here, just convert them to plain ASCII, for
portability. This fixes the test for all test configurations that
use Wine.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:37:29 +08:00
openvela-robot 1685f31803 FFmpeg: Fix compilation warning about size_t format printing
ffmpeg/libavdevice/nuttx_dec.c:107:39: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
  107 |             snprintf(data, data_size, "%d|%d|%d|%d|%"PRIu64"",
      |                                       ^~~~~~~~~~~~~~~
  108 |                      priv->running, priv->flushing,
  109 |                      priv->period_bytes, priv->periods, dq_count(&priv->bufferq));
      |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         size_t {aka unsigned int}

Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2026-04-20 20:37:25 +08:00
openvela-robot 0bf5f29940 avfilter/vf_ssim: Fix x86 assembly code for SSIM calculation
This commit fixes bug #10495

The code had several bugs related to post-loop compensation code:
- test assembly instruction performs bitwise AND operation and
generate flags used by jz branch instruction. Wrong test condition
leads to incorrect branching
- Incorrect compensation code for some branches

Signed-off-by: Evgeny Pavlov <lucenticus@gmail.com>
2026-04-20 20:37:23 +08:00
openvela-robot f05d9e758f FFmpeg: fix format warning in libavdevice/nuttx_dec.c
107 |             snprintf(data, data_size, "%d|%d|%d|%d|%d",
      |                                                    ~^
      |                                                     |
      |                                                     int
      |                                                    %ld
  108 |                      priv->running, priv->flushing,
  109 |                      priv->period_bytes, priv->periods, dq_count(&priv->bufferq));
      |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         size_t {aka long unsigned int}

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2026-04-20 20:37:18 +08:00
openvela-robot 664f23c83f avcodec/exr: tag gamma=1.0 output as linear light
By default the OpenEXR decoder outputs linear light pixel data by
applying a gamma=1.0 transfer (i.e. a no-op). When it does so, it
should tag the data as linear so color-managed filters or other tools
can work with it correctly.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2026-04-20 20:37:15 +08:00
openvela-robot 773d02532e ffmpeg: let bluelet devices report sample formats
Signed-off-by: jihandong <jihandong@xiaomi.com>
2026-04-20 20:37:11 +08:00
openvela-robot c6e235379e avformat/flvdec: handle exheader fourcc correctly in metadata
In metadata fourcc is carried in the AMF number, not as binary.

Partially based on a patch by Steven Liu.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 20:36:59 +08:00
openvela-robot c37847a7fe FFmpeg: fix coverity warning in libavdevice/nuttx.c
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2026-04-20 20:36:55 +08:00
openvela-robot fd17e1ad7b libswresample: Prevent out of bounds.
We've been fuzzing torchvision with [sydr-fuzz](https://github.com/ispras/oss-sydr-fuzz)
and found out of bounds error in ffmpeg project at audioconvert.c:151.
To prevent error we need to fix checks for in and out fmt in swr_init.

Signed-off-by: Eli Kobrin <kobrineli@ispras.ru>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:36:47 +08:00
openvela-robot 951e11666c ffmpeg : adevsink add support to get current playback timestamp
adevsink add support to get current playback timestamp.

Signed-off-by: libei1 <libei1@xiaomi.com>
2026-04-20 20:36:38 +08:00
openvela-robot 8a3ef023ab fftools/ffprobe: Fix memleak
Fixes Coverity issue #1524491.
Regression since e6126abc6997058ca49ee596b70611bbe367163e.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:36:35 +08:00
openvela-robot 2a63a6b065 ffmpeg:optimize bluelet enc control msg case
optimize bluelet enc control msg case

Signed-off-by: shipei <shipei@xiaomi.com>
2026-04-20 20:36:32 +08:00
openvela-robot 48787dc6df avcodec: move mastering display colour volume SEI handling to h2645_sei
This allows this common H.274 SEI to be parsed from both H.264
as well as HEVC, as well as probably from VVC in the future.

Generally attempts to keep the original code as similar as possible.

FATE test refererence changes only change the order of side data
export within a single frame. Nothing else seems to have changed.
2026-04-20 20:36:26 +08:00
openvela-robot b6455e61f3 ffmpeg: bluelet_dec handles start/stop instead of play/pause
Signed-off-by: jihandong <jihandong@xiaomi.com>
2026-04-20 20:36:23 +08:00
openvela-robot 1b66c53eef hwcontext_vulkan: hide Linux-only header after 571756bf2fe2
major/minor are in <sys/types.h> on BSDs and <sys/mkdev.h> on Solaris-like.

libavutil/hwcontext_vulkan.c:55:10: fatal error: 'sys/sysmacros.h' file not found
#include <sys/sysmacros.h>
^~~~~~~~~~~~~~~~~
2026-04-20 20:36:16 +08:00
openvela-robot 6dcc9fb36f FFMPEG: query sample_format from audio driver.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:36:12 +08:00
openvela-robot 18ce7087fe lavd/opengl: select the GL context before drawing
Since “2d924b3a63 fftools/ffmpeg: move each muxer to a separate thread”,
opengl_write_packet() is called from a different thread than
opengl_write_header() and would nothing for lack of a selected context.
2026-04-20 20:35:57 +08:00
openvela-robot a908a5723a FFMPEG: use start/stop command to control device filter.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:35:42 +08:00
openvela-robot f903ae1658 avcodec/decode: Return EAGAIN instead of discarding unused packet
Should fix #10457, a regression caused by
69516ab3e917a6e91d26e38d04183c60fd71cbab.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:35:37 +08:00
openvela-robot 434d603b18 ffmpeg:add bluelet leaudio dec/enc handler
Signed-off-by: chengkai <chengkai@xiaomi.com>
2026-04-20 20:35:33 +08:00
openvela-robot 3d4081fba4 lavc: add a header for internal generic-layer APIs
The goal is to distinguish between APIs provided by the generic layer to
individual codecs and APIs internal to the generic layer.

Start by moving ff_{decode,encode}_receive_frame() and
ff_{decode,encode}_preinit() into this new header, as those functions
are called from generic code and should not be visible to individual
codecs.
2026-04-20 20:35:28 +08:00
openvela-robot 7f66e86a15 ffmpeg: adevsrc should report accurate ch_layout
Signed-off-by: jihandong <jihandong@xiaomi.com>
2026-04-20 20:35:24 +08:00
openvela-robot 0fd69129a5 amfenc: Update the min version to 1.4.29.0 for AMF SDK. 2026-04-20 20:35:15 +08:00
openvela-robot 5ed8233148 libavdevice/nuttx : nuttx enc support get_output_timestamp
JIRA-ID:VELAPLATFO-8755

nuttx_enc compute timestamp, and add get_output_timestamp

Signed-off-by: libei1 <libei1@xiaomi.com>
2026-04-20 20:35:11 +08:00
openvela-robot e1b5c84cd3 avformat/evc: use get_ue_golomb_long()
This partially reverts commit d0fc1b3507c, which reintroduced a regression
originally fixed in 5e9986fd2d.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:35:08 +08:00
openvela-robot 2a2eefee82 ffmpeg : improve libavdevice/nuttx captured definition
JIRA-ID:VELAPLATFO-9568

add bool capture for in/out device, add io_bytes for both devices

Signed-off-by: libei1 <libei1@xiaomi.com>
2026-04-20 20:35:05 +08:00
openvela-robot 73855e8f18 doc/filters: correct luma terminology
Partially fixes #10427

See https://poynton.ca/notes/colour_and_gamma/ColorFAQ.html#RTFToC11 for
ref.
2026-04-20 20:35:02 +08:00
openvela-robot 29665002de FFMPEG: code optimizing.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:34:58 +08:00
openvela-robot b0a492cdcb avfilter/af_afir: do not use ff_outlink_get_status() on inlinks 2026-04-20 20:34:11 +08:00
openvela-robot 89a65397fa FFMPEG: fix dereference pkt is null
check pkt whether is null avoid avcodec_receive_packet function call av_packet_unref dereference segmentation fault.

Signed-off-by: cenzhanquan1 <cenzhanquan1@xiaomi.com>
2026-04-20 20:34:08 +08:00
openvela-robot 1d98ae6c8a avcodec/av1dec: convert to receive_frame()
This removes the overhead of inserting the av1_frame_split bsf as part of the
decoding process.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:33:49 +08:00
openvela-robot 7f73494f77 FFMPEG: Fix warnings.
ffmpeg/libavdevice/nuttx.c:451:57: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
  451 |     av_log(NULL, AV_LOG_DEBUG, "[%s][%s] configure, sr:%u ch:%d ret:%d\n",
      |                                                        ~^
      |                                                         |
      |                                                         unsigned int
      |                                                        %lu
  452 |         __func__, priv->devname, priv->sample_rate, priv->ch_layout.nb_channels, ret);
      |                                  ~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      uint32_t {aka long unsigned int}

Signed-off-by: cenzhanquan1 <cenzhanquan1@xiaomi.com>
2026-04-20 20:33:46 +08:00
openvela-robot 035e455b52 fate/tests/ffmpeg: use -idct simple for fate-ffmpeg-input-r
Makes the test bitexact on non-x86_64.
2026-04-20 20:33:42 +08:00
openvela-robot 841a14fc5a external/ffmpeg: check ranges of channels
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:33:38 +08:00
openvela-robot 9903242bf8 doc/filters/libplacebo: remove outdated example
This example being first is now misleading because round-tripping
through hwdownload/hwupload is neither required nor recommended. Also,
the comment about avoiding format conversion is unnecessary because
`libplacebo` will now inherit the input frame format by default.
2026-04-20 20:32:54 +08:00
openvela-robot ae7e7b05d9 ffmpeg: plentful debug log
N/A

1. device ioctl debug log e.g.
[   26.191100] [14] [ DEBUG] [ap] [ff_nuttx_open][/dev/audio/pcm0p] configure, sr:44100 ch:2 ret:0
[   26.191200] [14] [ DEBUG] [ap] [ff_nuttx_open][/dev/audio/pcm0p] set buffer info, n:4 size:3528
[   26.191300] [14] [ DEBUG] [ap] [ff_nuttx_open][/dev/audio/pcm0p] get buffer info, n:4 size:3528 ret:0
[   26.534200] [14] [ DEBUG] [ap] [ff_nuttx_write_data][/dev/audio/pcm0p] start ret:0

2. format negotiation debug log e.g.
[   21.142400] [14] [ DEBUG] [ap]
                 amix@MixSpeaker   chs: order:1,ch:2,0x3
                  adevsink@pcm0p   chs: order:0,ch:1,0x0 order:0,ch:2,0x0
                 amix@MixSpeaker rates: 44100
                  adevsink@pcm0p rates: 8000 11025 16000 22050 32000 44100 48000
                 amix@MixSpeaker  fmts: s16p
                  adevsink@pcm0p  fmts: s16
[   21.142500] [14] [ DEBUG] [ap]
                 amix@MixSpeaker   chs: order:1,ch:2,0x3
                  adevsink@pcm0p   chs: order:1,ch:2,0x3
                 amix@MixSpeaker rates: 44100
                  adevsink@pcm0p rates: 44100
                 amix@MixSpeaker  fmts: s16p
                  adevsink@pcm0p  fmts: s16
[   21.142700] [14] [ DEBUG] [ap] Setting 'converter' to value '4'
[   21.142800] [14] [ DEBUG] [ap] auto-inserting filter 'auto_aresample' between the filter 'amix@MixSpeaker' and the filter 'adevsink@pcm0p'

Signed-off-by: jihandong <jihandong@xiaomi.com>
2026-04-20 20:32:51 +08:00
openvela-robot 9050404993 avcodec/libx264: add a flush callback
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:32:14 +08:00
openvela-robot 24478030d4 FFMPEG: fix system crash when sim boot whithout camera
Signed-off-by: lile7 <lile7@xiaomi.com>
2026-04-20 20:32:11 +08:00
openvela-robot f3b118c812 libavformat/tcp: add local_addr/local_port for network option
Signed-off-by: jackarain <jack.wgm@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2026-04-20 20:32:04 +08:00
openvela-robot d9f83b4739 FFMPEG: add offload option in adevsink.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:32:01 +08:00
openvela-robot 5ab7442253 lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property from ARIB_CAPTION
To support bitmap subtitle output, remove AV_CODEC_PROP_TEXT_SUB
property from codec descriptor for AV_CODEC_ID_ARIB_CAPTION.
This is similar to `libavcodec/libzvbi-teletextdec.c`
(AV_CODEC_ID_DVB_TELETEXT).

Instead, each subtitle decoder has to specify a subtitile format.
`libavcodec/libaribb24.c` uses same AV_CODEC_ID_ARIB_CAPTION and
expects AV_CODEC_PROP_TEXT_SUB to be set, so this adds a line to
specify a format there.

Signed-off-by: rcombs <rcombs@rcombs.me>
2026-04-20 20:31:57 +08:00
openvela-robot e22343cd0e FFMPEG: add default codec setting in query_format.
dependson:888283

1, Filters which hook query_formats, set codecs in filter_query_formats.
streamselect is exception because it hook sanitize_formats.

2, Filters which doesn't hook query_formats, set codecs in ff_default_query_formats.

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:31:54 +08:00
openvela-robot 8161f26c12 avcodec/avutil: move dynamic HDR10+ metadata parsing to libavutil
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:31:47 +08:00
openvela-robot 96e3f5956c ffmpeg: fix NULL strcmp error
N/A

Signed-off-by: jihandong <jihandong@xiaomi.com>
2026-04-20 20:31:43 +08:00
openvela-robot d82f9ae7d8 lavu/frame: improve AVFrame.opaque[_ref] documentation
Make them match each other, mention interaction with
AV_CODEC_FLAG_COPY_OPAQUE.
2026-04-20 20:31:34 +08:00
openvela-robot a8e85bba00 ffmpeg: nuttx_dec support temparory pause
Signed-off-by: jihandong <jihandong@xiaomi.com>
2026-04-20 20:31:30 +08:00
openvela-robot 51b3e1bb2d avfilter/af_afir: reduce output gain with default parameters
It was unreasonably high. Also change scaling to reduce
rare quantization errors.
2026-04-20 20:30:36 +08:00
openvela-robot dcac24dcec ffmpeg: fix uinit error
0  0x5672bb6e in avformat_free_context (s=0x56d21060) at ffmpeg/libavformat/avformat.c:129
1  0x567ddf8e in adevsink_uninit (ctx=0x56d228b0) at ffmpeg/libavfilter/asink_adevsink.c:169
2  0x56721835 in avfilter_free (filter=0x56d228b0) at ffmpeg/libavfilter/avfilter.c:863
3  0x5672a92e in create_filter (log_ctx=0x56d14590, args=0x56d23050 "format=nuttx:devname=/dev/audio/pcm0p", name=0x56d22f40 "adevsink@pcm0p", index=<optimized out>, ctx=0xfffffffe,
   filt_ctx=0xf6ec3e88) at ffmpeg/libavfilter/graphparser.c:158
4  parse_filter (filt_ctx=filt_ctx@entry=0xf6ec3e88, buf=buf@entry=0xf6ec3e6c, graph=graph@entry=0x56d14590, index=24, log_ctx=0x56d14590) at ffmpeg/libavfilter/graphparser.c:201
5  0x5672af22 in avfilter_graph_parse2 (graph=0x56d14590, filters=<optimized out>, inputs=0xf6ec3ed8, outputs=0xf6ec3edc) at ffmpeg/libavfilter/graphparser.c:438
6  0x5671bc90 in media_graph_load (priv=0x56d16bf0, conf=0x56a5a466 "/etc/media/graph.conf") at media_graph.c:153
7  0x5671c435 in media_graph_create (file=0x56a5a466) at media_graph.c:337
8  0x56713f0b in mediad_main (argc=1, argv=0xf6cb5040) at media_daemon.c:163
9  0x5658de28 in nxtask_startup (entrypt=0x56713e8b <mediad_main>, argc=1, argv=0xf6cb5040) at sched/task_startup.c:70
10 0x5657ff82 in nxtask_start () at task/task_start.c:134
11 0xdeadbeef in ?? ()

Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 20:30:32 +08:00
openvela-robot edc934782f avcodec/pnmenc: Check av_image_get_buffer_size()
Fixes the crash in ticket #10050.
Also ensure that we don't overflow before ff_get_encode_buffer().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 20:30:02 +08:00
openvela-robot 1d136bd248 bluelet:fix build error if not enable CONFIG_NET_RPMSG
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 20:29:57 +08:00
openvela-robot 6d4e16b532 avfilter/af_firequalizer: switch to TX from lavu 2026-04-20 20:29:50 +08:00
openvela-robot 9299ef8b7b ffmpeg/bluelet:fix warning
libavdevice/bluelet.c:357:33: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
  357 |                 "channel_mode=%lu:blocks=%lu:subbands=%lu:alloc_method=%lu:bitpool=%lu",
      |                               ~~^
      |                                 |
      |                                 long unsigned int
      |                               %u
  358 |                 param.channel_mode, param.blocks, param.subbands, param.alloc_method, param.bitpool);
      |                 ~~~~~~~~~~~~~~~~~~
      |                      |
      |                      uint32_t {aka unsigned int}
libavdevice/bluelet.c:357:44: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
  357 |                 "channel_mode=%lu:blocks=%lu:subbands=%lu:alloc_method=%lu:bitpool=%lu",
      |                                          ~~^
      |                                            |
      |                                            long unsigned int
      |                                          %u
  358 |                 param.channel_mode, param.blocks, param.subbands, param.alloc_method, param.bitpool);
      |                                     ~~~~~~~~~~~~
      |                                          |
      |                                          uint32_t {aka unsigned int}

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 20:29:47 +08:00
openvela-robot 0e99873ffa avfilter/af_loudnorm: fix incorrect gain when audio is shorter than 3s
The input data is multiplied by `s->offset` to get normalized output.
`s->target_tp` and `true_peak` is not in dB,
so `s->offset` should be calculated by division instead of subtraction.

Signed-off-by: Rui Zhu <real.zhurui@gmail.com>
2026-04-20 20:29:37 +08:00
openvela-robot 5de2d251c8 FFmpeg/bluelet:adapt to 5.1.1 version
Signed-off-by: jihandong <jihandong@xiaomi.com>
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 20:29:34 +08:00
openvela-robot d4c7951080 avfilter/vf_pseudocolor: add spectral preset 2026-04-20 20:29:22 +08:00
openvela-robot 90eb42bda6 Merge branch 'origin511' into sync511 2026-04-20 20:29:19 +08:00
openvela-robot e4e6bf1c1e avformat/dashenc: Disable streaming for webm output
Currently streaming for webm output doesn't work.
Disabling explicitly will make sure that the manifest will get generated correctly.
2026-04-20 20:07:10 +08:00
openvela-robot 6f5fe076ef configure: Include time.h when checking for gmtime_r and localtime_r
These functions are available in time.h (conditional on posix thread
safe functions) on mingw.

Previously, these functions weren't detected by configure, and
libavutil/time_internal.h provided replacements, even if time.h
actually contained definitions of them.

These mingw inline functions are currently defined as
 "extern __inline __attribute__((__gnu_inline__))". In this case,
redefining a new static inline version of the same function with the
same name is tolerated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:07:06 +08:00
openvela-robot 8bdc1bb6e0 avdevice/decklink_dec: set configs before listing formats
Format list can be input and profile dependant.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-04-20 20:06:59 +08:00
openvela-robot 421b75708c rtsp: add pkt_size option
This allows users to specify an upper limit on the size of outgoing packets
when publishing via RTSP.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:06:54 +08:00
openvela-robot 4b0e5391a6 lavu/opencl: replace va_ext.h with standard name
Khronos OpenCL header (https://github.com/KhronosGroup/OpenCL-Headers)
uses cl_va_api_media_sharing_intel.h. And Intel's official OpenCL driver
for Intel GPU (https://github.com/intel/compute-runtime) was compiled
against Khronos OpenCL header. So it's better to align with Khronos.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2026-04-20 20:06:39 +08:00
openvela-robot 21d48ad714 arm: Implement a NEON version of 422 h264_h_loop_filter_chroma
Previously, the 420 version was used even for 422.

This fixes occasional checkasm failures.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:06:37 +08:00
openvela-robot 18c5d7c990 avfilter/af_anlmdn: add output mode option 2026-04-20 20:05:58 +08:00
openvela-robot 07986530f9 h264/arm64: implement missing 4:2:2 chroma loop filter neon functions 2026-04-20 20:05:55 +08:00
openvela-robot 502d5ab63d libavcodec/zmbvenc: block scoring improvements/bug fixes
- Improve block choices by counting 0-bytes in the entropy score
- Make histogram use uint16_t type, to allow byte counts from 16*16
(current block size) up to 255*255 (maximum allowed 8bpp block size)
- Make sure score table is big enough for a full block's worth of bytes
- Calculate *xored without using code in inner loop
2026-04-20 20:05:33 +08:00
openvela-robot a9d4b932f6 libavcodec: vp8 neon optimizations for aarch64
Partial port of the ARM Neon for aarch64.

Benchmarks from fate:

benchmarking with Linux Perf Monitoring API
nop: 58.6
checkasm: using random seed 1760970128
NEON:
 - vp8dsp.idct       [OK]
 - vp8dsp.mc         [OK]
 - vp8dsp.loopfilter [OK]
checkasm: all 21 tests passed
vp8_idct_add_c: 201.6
vp8_idct_add_neon: 83.1
vp8_idct_dc_add_c: 107.6
vp8_idct_dc_add_neon: 33.8
vp8_idct_dc_add4y_c: 426.4
vp8_idct_dc_add4y_neon: 59.4
vp8_loop_filter8uv_h_c: 688.1
vp8_loop_filter8uv_h_neon: 216.3
vp8_loop_filter8uv_inner_h_c: 649.3
vp8_loop_filter8uv_inner_h_neon: 195.3
vp8_loop_filter8uv_inner_v_c: 544.8
vp8_loop_filter8uv_inner_v_neon: 131.3
vp8_loop_filter8uv_v_c: 706.1
vp8_loop_filter8uv_v_neon: 141.1
vp8_loop_filter16y_h_c: 668.8
vp8_loop_filter16y_h_neon: 242.8
vp8_loop_filter16y_inner_h_c: 647.3
vp8_loop_filter16y_inner_h_neon: 224.6
vp8_loop_filter16y_inner_v_c: 647.8
vp8_loop_filter16y_inner_v_neon: 128.8
vp8_loop_filter16y_v_c: 721.8
vp8_loop_filter16y_v_neon: 154.3
vp8_loop_filter_simple_h_c: 387.8
vp8_loop_filter_simple_h_neon: 187.6
vp8_loop_filter_simple_v_c: 384.1
vp8_loop_filter_simple_v_neon: 78.6
vp8_put_epel8_h4v4_c: 3971.1
vp8_put_epel8_h4v4_neon: 855.1
vp8_put_epel8_h4v6_c: 5060.1
vp8_put_epel8_h4v6_neon: 989.6
vp8_put_epel8_h6v4_c: 4320.8
vp8_put_epel8_h6v4_neon: 1007.3
vp8_put_epel8_h6v6_c: 5449.3
vp8_put_epel8_h6v6_neon: 1158.1
vp8_put_epel16_h6_c: 6683.8
vp8_put_epel16_h6_neon: 831.8
vp8_put_epel16_h6v6_c: 11110.8
vp8_put_epel16_h6v6_neon: 2214.8
vp8_put_epel16_v6_c: 7024.8
vp8_put_epel16_v6_neon: 799.6
vp8_put_pixels8_c: 112.8
vp8_put_pixels8_neon: 78.1
vp8_put_pixels16_c: 131.3
vp8_put_pixels16_neon: 129.8

This contains a fix to include guards by Carl Eugen Hoyos.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:05:29 +08:00
openvela-robot c9bf4df9a2 avcodec/cuviddec: Add support for decoding HEVC 4:4:4 content
This is the equivalent change for cuviddec after the previous change
for nvdec. I made similar changes to the copying routines to handle
pixel formats in a more generic way.

Note that unlike with nvdec, there is no confusion about the ability
of a codec to output 444 formats. This is because the cuvid parser is
used, meaning that 444 JPEG content is still indicated as using a 420
output format.
2026-04-20 20:05:25 +08:00
openvela-robot 072316a06e tests: Convert image2pipe tests to non-legacy test scripts 2026-04-20 20:05:22 +08:00
openvela-robot 915de33032 avcodec/hevc_ps: Expose all SPS and PPS range extension flags
We need all the flags to be exposed to be able to pass them on to
HW decoders. I did not attempt to nuance any of the warnings about
flags being unsupported as there's no way, at the point we extract
flags, to say whether an HW decoder is being used.
2026-04-20 20:05:18 +08:00
openvela-robot 82b771b005 build: Rename OBJDIRS variable to OUTDIRS
These directories are not just for object files.
2026-04-20 20:05:15 +08:00
openvela-robot 02e4cfb88f tests/api/api-h264-test: Add AV_NOPTS_VALUE check for AVFrame.pkt_dts/pts
Use av_ts2str() for AVFrame.pkt_dts/pts to avoid print the
pkt_dts/pts as negative number like:
"0,    3616613, -9223372036854775808,     1001,  3110400, 0x75e37a65"

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2026-04-20 20:05:11 +08:00
openvela-robot e81ab92a8c srt: Set srto_sender flag to sender srt socket
SRT API Documentation:
This flag is superfluous if both parties are at least version 1.3.0
(this shall be enforced by setting this value to SRTO_MINVERSION if
you expect that it be true) and therefore support HSv5 handshake,
where the SRT extended handshake is done with the overall handshake
process.

This flag is however obligatory if at least one party may be using
SRT below version 1.3.0 and does not support HSv5.
2026-04-20 20:05:08 +08:00
openvela-robot 60228adbd0 avcodec: add ARBC decoder
Thanks Kostya for great help in reversing binary.
2026-04-20 20:04:59 +08:00
openvela-robot 19c9003c2e h264/x86: sign extend int stride in deblock functions
Fixes checkasm errors after adding the h264 deblock tests.
2026-04-20 20:04:56 +08:00
openvela-robot b32b1dc31f h2645_parse: Make ff_h2645_packet_split reference-compatible
This is in preparation for a patch for cbs_h2645. Now the packet's
rbsp_buffer can be owned by an AVBuffer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2026-04-20 20:04:45 +08:00
openvela-robot 01716fe34a avcodec/libdav1d: properly free all output picture references
Dav1dPictures contain more than one buffer reference, so we're forced to use the
API properly to free them all.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:04:37 +08:00
openvela-robot 2cb18a564f avformat/utils: add support for reading ID3 tags at start of wav
Fixes #4140.
2026-04-20 20:04:09 +08:00
openvela-robot 51cfd36764 libdav1d: update API usage to the first stable release
The color fields were moved to another struct, and a way to propagate
timestamps and other input metadata was introduced, so the packet
fifo can be removed.

Add support for 12bit streams, an option to disable film grain, and
read the profile from the sequence header referenced by the ouput
picture instead of guessing based on output pix_fmt.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:04:06 +08:00
openvela-robot 0fe013bb01 avutil/hwcontext_cuda: Define and use common CHECK_CU()
We have a pattern of wrapping CUDA calls to print errors and
normalise return values that is used in a couple of places. To
avoid duplication and increase consistency, let's put the wrapper
implementation in a shared place and use it everywhere.

Affects:

* avcodec/cuviddec
* avcodec/nvdec
* avcodec/nvenc
* avfilter/vf_scale_cuda
* avfilter/vf_scale_npp
* avfilter/vf_thumbnail_cuda
* avfilter/vf_transpose_npp
* avfilter/vf_yadif_cuda
2026-04-20 20:03:45 +08:00
openvela-robot 0862568f69 libdav1d: fix build after a recent API break
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:03:42 +08:00
openvela-robot f754ef6f7c avfilter/avf_showspectrum: improve magma colors 2026-04-20 20:03:34 +08:00
openvela-robot ab457c1150 pixfmt: Add GRAY10
Based on 7471352f by Luca Barbato.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:03:31 +08:00
openvela-robot 84f049ebfa libavutil: Undeprecate the AVFrame reordered_opaque field
This was marked as deprecated (but only in the doxygen, not with an
actual deprecation attribute) in 81c623fae0 in 2011, but was
undeprecated in ad1ee5fa7.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:03:27 +08:00
openvela-robot 1c03272fcd libavutil: Undeprecate the AVFrame reordered_opaque field
This was marked as deprecated (but only in the doxygen, not with an
actual deprecation attribute) in 81c623fae0 in 2011, but was
undeprecated in ad1ee5fa7.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:03:24 +08:00
openvela-robot 04189dd1be tests/api-h264-slice-test: use the correct function to free the AVHashContext
Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:03:15 +08:00
openvela-robot 2ce8e6cae4 Revert "decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext"
This reverts commit 662558f985.

The avcodec_parameters_to_context() call was freeing and reallocating
AVCodecContext->extradata, essentially taking ownership of it, which according
to the doxy is user owned. This is an API break and has produces crashes in
some library users like Firefox.
Revert until a better solution is found to internally propagate the filtered
extradata back into the decoder context.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:03:12 +08:00
openvela-robot bddaa5ca6c avcodec/aacdec_template: Allow duplicated elements
Such streams are invalid according to
4.5.2.1 Top level payloads for the audio object types AAC main, AAC SSR, AAC LC and AAC LTP
4.5.2.1.1 Definitions
...cIn the raw_data_block(), several instances of the
same syntactic element may occur, but must have a different 4 bit
element_instance_tag, except for data_stream_element()'s and
fill_element()'s.

Fixes: Ticket7477

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:03:00 +08:00
openvela-robot 8bbb4980a3 avcodec/libaomenc: remove AVOption related to frame partitions
Support for it was apparently never in the codebase, and the enum
value was recently removed from the public headers [1]

[1] https://aomedia.googlesource.com/aom/+/df4ffb73140fe31bebdabd17c1a7b53721e74838

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2026-04-20 20:02:57 +08:00