1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-10-06 05:47:18 +02:00

9460 Commits

Author SHA1 Message Date
Romain Beauxis
de8d57e4c5 ogg/vorbis: implement header packet skip in chained ogg bitstreams. 2025-10-01 14:20:55 +00:00
Marton Balint
8e11e2cdb8 avformat/tls_openssl: initialize underlying protocol early for dtls_start()
The same way we do with TLS, so all tls URL options will be properly supported.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
2762ae74c5 avformat/tls: use ff_parse_opts_from_query_string() to set URL parameters
Note that this changes the code to work the same way as other protocols where
an URL parameter can override an AVOption.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
3166e3b539 avformat/rtpproto: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
f231439ee7 avformat/sctp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
49c6e6cc44 avformat/tcp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
7e58fff9d0 avformat/udp: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Marton Balint
2d06ed9308 avformat/libsrt: use ff_parse_opts_from_query_string() to set URL parameters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-10-01 00:34:19 +02:00
Niklas Haas
b80f28fcbc avfilter/vf_libplacebo: introduce fit_sense option
This allows choosing whether the `fit_mode` merely controls the placement
of the image within the output resolution, or whether the output resolution
is also adjusted according to the given `fit_mode`.
2025-09-30 15:39:39 +00:00
Niklas Haas
12d696cff4 avfilter/vf_libplacebo: introduce fit_mode option
The semantics of these keywords are well-defined by the CSS 'object-fit'
property. This is arguably more user-friendly and less obtuse than the
existing `normalize_sar` and `pad_crop_ratio` options. Additionally, this
comes with two new (useful) behaviors, `none` and `scale_down`, neither of
which map elegantly to the existing options.

One additional benefit of this option is that, unlike `normalize_sar`, it
does *not* also imply `reset_sar`; meaning that users can now choose to
have an anamorphic base layer and still have the overlay images scaled to fit
on top of it according to the chosen strategy.

See-Also: https://drafts.csswg.org/css-images/#the-object-fit
2025-09-30 15:39:39 +00:00
Gyan Doshi
74115b017c doc: indicate libmpeghdec is non-free 2025-09-30 11:55:02 +00:00
Nikolay Aleksandrov
1608aa38a2 doc/infra: More details about hosting and security
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

I have redacted the exact location of the FFmpeg server as writing
that in public seems just a bad idea
2025-09-30 13:14:03 +02:00
James Almer
d975dbd7b7 avcodec/libdav1d: bump minimum supported version to 1.0.0
This allows us to remove old deprecated options.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-28 23:53:27 -03:00
Stadelmann, Daniel
56c14f2311 avcodec/libmpeghdec: add MPEG-H 3DA Fraunhofer IIS mpeghdec decoder
Adds a wrapper around the Fraunhofer IIS MPEG-H 3D Audio mpeghdec [1]
decoder shared library.

[1] https://github.com/Fraunhofer-IIS/mpeghdec

Signed-off-by: Stadelmann, Daniel <daniel.stadelmann@iis.fraunhofer.de>
2025-09-24 08:25:42 +02:00
Marton Balint
3a29702cb6 avformat/rtpproto: add some URL options as AVOption aliases
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
7d1e22b7ea avformat/tls: add some URL options as AVOption aliases
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Marton Balint
3e7314fe30 avformat/udp: add DSCP as a normal AVOption
Previously this was an URL-only option.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-19 09:59:26 +02:00
Drew Dunne
76471fb143 vf_colorspace: Add an option to clamp trc LUT output
Add a new flag to the vf_colorspace filter which provides the user an
option to clamp the linear and delinear transfer characteristics LUT
values to the [0, 1] represented range. This helps constrain the
potential value range when converting between colorspaces.

Certain colors when going through the conversion can result in out of
gamut colors after the rotation. The colorspace filter allows that with
the extended range. The added clamping just keeps the colors within the
[0, 1) range rather than using that extended range. I'm not enough of a
color scientist to say which is correct, but there are certain
situations where we would prefer to keep the colors in gamut.

The example I have is:

A solid color image of 8-bit YUV: Y=157, U=164, V=98.

Specify the input as:

Input range: MPEG
In color matrix: BT470BG
In color primaries: BT470M
In color transfer characteristics: Gamma 28

Output as:
Out color range: JPEG
Out color matrix: BT.709
Out color primaries: BT.709
Out color transfer characteristics: BT.709

During the calculation you get:

Input YUV:                             y=157,      u=164,      v-98
Post-yuv2rgb BT.470BG:                 r=0.456055, g=0.684152, b=0.928606
Post-apply gamma28 linear LUT:         r=0.110979, g=0.345494, b=0.812709
Post-color rotation BT.470M to BT.709: r=-0.04161, g=0.384626, b=0.852400
Post-apply Rec.709 delinear LUT:       r=-0.16382, g=0.615932, b=0.923793
Post-rgb2yuv Rec.709 matrix:           y=120,      u=190,      v=25

Where with this change, the delinear LUT output would be clamped to 0,
so the result would be:
r=0.000000, g=0.612390, b=0.918807 and a final output of
y=129, u=185, v=46

As for the long and av_clip64, this was just because lrint returned a
long, so I left it as that and then used av_clip64 to the [0,1) range to
avoid overflow. But re-reading, it looks like av_clip_int16 would
downcast that long to int anyway so the possibility of overflow already
existed there. I've put it back to int just to match the existing
behavior.
2025-09-15 14:39:09 +00:00
Timo Rothenpieler
6e63b978d3 doc/filters: fix missed reference to outdated option name 2025-09-14 15:33:31 +02:00
Timo Rothenpieler
36e374efb0 avfilter: add gfxcapture, Windows.Graphics.Capture based window/monitor capture 2025-09-14 11:45:11 +00:00
Zhao Zhili
09856e4e48 doc/examples/vaapi_encode: fix invalid check on fwrite
enc_pkt->size is 0 after av_packet_unref, which makes the check invalid.

Fix regression from 3e4bfff2.

Co-Authored-by: Jin Bo <jinbo@loongson.cn>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-09-08 20:43:07 +00:00
Dmitrii Ovchinnikov
1b97966199 avutil/hwcontext_d3d12va: added resource and heap flags to DeviceContext 2025-09-08 15:44:47 +00:00
Marton Balint
9458a6f8ec avformat/utils: add AV_FRAME_FILENAME_FLAGS_IGNORE_TRUNCATION flag
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-09-05 21:05:13 +02:00
Niklas Haas
dfc3256da1 avfilter/af_afade: support multiple inputs
Instead of just 2 files, generalize this filter to support crossfading
arbitrarily many files. This makes the filter essentially operate similar
to the `concat` filter, chaining multiple files one after another.

Aside from just adding more input pads, this requires rewriting the
activate function. Instead of a finite state machine, we keep track of the
currently active input index; and advance it only once the current input is
fully exhausted.

This results in arguably simpler logic overall.
2025-09-04 23:12:34 +00:00
Araz Iusubov
c2ce387385 avcodec/d3d12va_encode: texture array support for HEVC
This patch adds support for the texture array feature
used by AMD boards in the D3D12 HEVC encoder.
In texture array mode, a single texture array is shared for all
reference and reconstructed pictures using different subresources.
The implementation ensures compatibility
and has been successfully tested on AMD, Intel, and NVIDIA GPUs.
2025-09-03 11:56:06 +02:00
Niklas Haas
6f3eddbedd avfilter/vf_overlay: configure alpha mode on the link
And use the link-tagged value instead of the hard-coded parameter.
2025-09-02 17:06:25 +02:00
Niklas Haas
1c8ca56a88 avfilter/vf_libplacebo: add an alpha_mode setting
Chooses the desired output alpha mode. Note that this depends on
an upstream version of libplacebo new enough to respect the corresponding
AVFrame field in pl_map_avframe_ex.
2025-09-02 17:06:25 +02:00
Niklas Haas
dc02514f6b avfilter/vf_setparams: add alpha_mode parameter 2025-09-02 17:06:25 +02:00
Niklas Haas
2b1ef029eb avfilter/vf_format: add alpha_modes parameter 2025-09-02 17:06:25 +02:00
Niklas Haas
de297ae2fc avfilter/buffersrc: add alpha_mode parameter 2025-09-02 17:06:25 +02:00
Niklas Haas
0fbd90d78f avfilter/buffersink: add support for alpha modes 2025-09-02 17:06:25 +02:00
Niklas Haas
ecebf9c693 avcodec/avcodec: add AVCodecContext.alpha_mode
Following in the footsteps of the previous commit, this commit adds the
new fields to AVCodecContext so we can start properly setting it on codecs,
as well as limiting the list of supported options to detect a format mismatch
during encode.

This commit also sets up the necessary infrastructure to start using the
newly added field in all codecs.
2025-09-02 17:06:24 +02:00
Niklas Haas
c39a67e64f avfilter/vf_premultiply: add dynamic variant of this filter
We need a filter that can premultiply and unpremultiply the alpha channel
dynamically, on demand, in response to the negotiated alpha mode, analogous
to how vf_scale operates. Introduce a new filter "vf_premultiply_dynamic"
that accomplishes this.
2025-09-02 17:06:09 +02:00
Niklas Haas
eea99a77ed avfilter: add link negotiation for AVAlphaMode 2025-09-02 17:06:08 +02:00
Niklas Haas
22929bd044 avutil/frame: add AVFrame.alpha_mode
FFmpeg currently handles alpha in a quasi-arbitrary way. Some filters/codecs
assume alpha is premultiplied, others assume it is independent. If there is
to be any hope for order in this chaos, we need to start by defining an enum
for the possible range of values.
2025-09-02 17:05:50 +02:00
Niklas Haas
ce0938da8c swscale: add SWS_UNSTABLE flag
Give users and developers a way to opt in to the new format conversion code,
and more code from the swscale rewrite in general, even while development is
still ongoing.
2025-09-01 19:28:35 +02:00
James Almer
4ffd621523 avcodec/packet: add an Exif side data type
Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-01 12:07:07 -03:00
Marton Balint
a8097d32ae avformat/img2dec: remove deprecated glob_sequence pattern type
"glob_sequence" was deprecated since 2012. This also changes the default pattern
to "sequence", because "glob_sequence" was also the default.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-26 14:41:44 +00:00
James Almer
2298d4d072 doc/APIchanges: add 8.0 cut line
Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-24 12:08:27 -03:00
James Almer
368b5e0ffc avcodec/exif: make the get and remove helpers take a flags argument as input
This makes the functions extensible, as future behavior change flags can be
introduced.

This is strictly speaking not an API break. Only if a user was setting
recursive to anything other than 1 it would now behave differently, but given
these functions have been in the tree for only a few days, the chances for that
are practically zero.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-24 12:34:15 +00:00
iddq
4e9a184d5c avformat/tcp: add option for enabling TCP keepalive 2025-08-22 18:20:08 +00:00
Niklas Haas
6825f6f1e2 avfilter/vf_libplacebo: add bwdif option
See-Also: https://code.videolan.org/videolan/libplacebo/-/merge_requests/737
2025-08-21 15:34:03 +00:00
Niklas Haas
8e0de5d811 avfilter/setpts: also preserve duration when not stripping fps
It makes sense to treat the presence of a frame duration and the presence
of frame rate metadata identically - because both convey effectively the same
amount of information.

In f121d95 and fa110c3 respectively, this information was stripped by default,
originally to work-around bugs when changing the PTS information of a stream
being fed to some encoders. (See https://trac.ffmpeg.org/ticket/10886)

Later, commit 959b799c restored the ability to preserve the frame rate
medatata via the `strip_fps` option, but this option did not extend to also
include the frame duration.

This commit resolves the scenario by making `frame_rate` and `duration`
handled in a consistent manner, so that the frame rate information is
generally preserved unless explicitly stripped by the user.

While it does regress the exact invocation presented in the trac ticket unless
using `strip_fps=yes`, I consider this an acceptable trade-off, especially in
light of the fact that the `fps` filter also exists and is arguably the better
tool for the task at hand.
2025-08-21 14:55:12 +02:00
Niklas Haas
67c15cf541 avutil/hwcontext_vulkan: add debug option to avoid host ptr imports
In some environments, these are prohibitively slow. Add a debug option
to prefer memcpy instead of importing host pointers.
2025-08-20 15:05:41 +00:00
James Almer
d151d3aecb avcodec/exif: don't expose a private function in an installed header
And it doesn't need an entry in APIChanges, given it's not public API.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-08-20 10:44:12 -03:00
Leo Izen
4c3f94f265 doc/APIChanges: document EXIF API additions
Many of these additions are in separate commits in one set, so in the
interest of clarity, the API changes are all documented in one commmit
here.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-08-19 11:32:06 -04:00
Niklas Haas
9b8b78a815 avfilter/vf_colordetect: detect fully opaque alpha planes
It can be useful to know if the alpha plane consists of fully opaque
pixels or not, in which case it can e.g. safely be stripped.

This only requires a very minor modification to the AVX2 routines, adding
an extra AND on the read alpha value with the reference alpha value, and a
single extra cheap test per line.

detect_alpha_8_full_c:                                2849.1 ( 1.00x)
detect_alpha_8_full_avx2:                              260.3 (10.95x)
detect_alpha_8_full_avx512icl:                         130.2 (21.87x)
detect_alpha_8_limited_c:                             8349.2 ( 1.00x)
detect_alpha_8_limited_avx2:                           756.6 (11.04x)
detect_alpha_8_limited_avx512icl:                      364.2 (22.93x)
detect_alpha_16_full_c:                               1652.8 ( 1.00x)
detect_alpha_16_full_avx2:                             236.5 ( 6.99x)
detect_alpha_16_full_avx512icl:                        134.6 (12.28x)
detect_alpha_16_limited_c:                            5263.1 ( 1.00x)
detect_alpha_16_limited_avx2:                          797.4 ( 6.60x)
detect_alpha_16_limited_avx512icl:                     400.3 (13.15x)
2025-08-18 18:50:00 +00:00
Kacper Michajłow
9b94b652db doc/examples/decode_filter_video: use av_usleep
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Kacper Michajłow
5a768e8dd0 doc/examples/decode_filter_audio: remove unused unistd.h include
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-08-11 19:29:53 +00:00
Lynne
85e8e59001 Revert "doc/developer: Basic documentation for Source Plugins"
This reverts commit 67320e0627.

We do not want random forks or features.
2025-08-11 19:53:28 +09:00