9334 Commits

Author SHA1 Message Date
b338d1b35b libs: bump major version for all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:44:34 -03:00
cbbc927a67 ffmpeg: add per-stream input option drop_changed
This is a replacement in ffmpeg for the deprecated avcodec flag AV_CODEC_FLAG_DROPCHANGED.

This option is meant to be used when the filtergraph should not be
reinited upon input parameter changes as that leads to loss of state
in the filtergraph potentially leading to broken or aborted output,
e.g. inserting of silence with first_pts specified in aresample.

Generally useful to avoid corrupted yet decodable packets in live
streaming inputs.

This option when enabled takes precedence over reinit_filters
2025-03-24 16:18:17 +05:30
49af9746e8 pixfmt: add AV_PIX_FMT_GBRAP32
This commit adds a 32-bit *integer* planar RGBA format.
Vulkan FFv1 decoding is best performed on separate planes, rather than
packed RGBA (i.e. RGBA128), hence this is useful as an intermediate format.
2025-03-17 08:49:04 +01:00
a1c6ca1683 doc/filters: Shift CUDA-based filters to own section. 2025-03-17 12:38:51 +05:30
61fc9b6fee avutil/pixfmt: add YAF16 and YAF32 pixel formats
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-10 10:15:42 -03:00
0245e9382c lavu: bump minor and add APIChanges entry for new GRAY32 pixfmts 2025-03-01 20:16:00 +01:00
0ef678f5c5 APIChanges: add entry for new AMD AMF pixfmt 2025-03-01 20:16:00 +01:00
a73760da53 APIChanges: add entries for new planar GBR and float gray pixfmts
Was not done when the patches were pushed.
2025-03-01 20:15:59 +01:00
469b7a0ee4 doc/developer: Better {} style rule
This makes developer.texi consistent with tools/patcheck

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-03-01 02:47:33 +01:00
5944c4b20a avfilter/vf_libplacebo: remove deprecated options
These were removed upstream and no longer have had any effect for
a while now.

Signed-off-by: Niklas Haas <git@haasn.dev>
2025-02-27 18:56:19 +01:00
27814dc3b6 avfilter/libplacebo: add option for outputting separate fields
cf. the other deinterlacing-aware filters.
2025-02-27 18:55:33 +01:00
794cba812e avfilter/libplacebo: add deinterlacing options
These were introduced in libplacebo API version 220. We actually already
map the field by default, but deinterlacing was never enabled unless the user
explicitly forced it using extra_ops.
2025-02-27 18:55:33 +01:00
9b11fefb88 aacenc: remove support for AAC Main profile
The Main profile of AAC is... terrible.
It enables the use of delta coding across coefficients of two frames
to try to increase compression, and it enabled one more pole for TNS
filters.

What the AAC authors failed to take into account were basic
mathematics, as MDCT leakage (e.g. the spread of each frequency when
represented in a discrete spectrum) is significant in most audio codecs.
This leads to huge variations between each frame, basically rendering
prediction completely pointless.

In fact, enabling AAC-Main prediction does not, in general, even recoup
the metadata losses from signalling the profile and prediction properties
in the first place. So you lose efficiency by using AAC Main.

The rumor is that it was put in the AAC spec for patent reasons, though
patent-wise, it has about as much use as a patent for a bicycle designed
for use by snakes.

The only other thing AAC Main changes is it permits 3-pole TNS filters.
When AAC's bands are absolutely tiny, except for very high frequency bands,
where you're likely to use PNS instead.

Just get rid of it.
2025-02-26 17:12:04 +01:00
6232f416b1 ffmpeg_demux: add option readrate_catchup
At present, if reading from a readrate-limited input is stalled,
then upon resumption, ffmpeg will read the input without any
throttle till the average readrate matches the specified readrate.

This new option allows to set a speed limit when reading is resumed
until the average readrate matches the primary readrate.

Fixes #11469
2025-02-24 15:16:59 +05:30
cd81f08491 avfilter/libplacebo: use a transparent default fillcolor
This will leave the background transparent when the target format
contains an alpha channel, without affecting the behavior on formats
without one.
2025-02-19 18:33:21 +01:00
4dc2ae69e7 avfilter/interlace_vulkan: add interlace_vulkan filter
This is a Vulkan-accelerated version of the existing interlace filter.
2025-02-17 17:16:25 +01:00
9fd23f712a fftools/opt_common: add time and datetime log flags
This commit adds two logging flags: 'time' and 'datetime'.

Usage:

ffmpeg -loglevel +time

or

ffmpeg -loglevel +datetime

Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-02-16 15:41:40 +01:00
c79cdae377 avutil/log: support logging of date and time information
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-02-16 15:41:40 +01:00
7ee4936e0a avfilter/vpp_amf: add option reset_sar
4b77a0a681 added a new consumer of ff_scale_adjust_dimensions
which was recently modified to allow for square pixel output.

This commit extends the new option to vpp_amf, and unbreaks the building
of vf_amf_common.c
2025-02-10 19:59:26 +05:30
a28dc06869 avfilter/scale*: add option reset_sar
For anamorphic videos, enabling this option leads to adjustment of
output dimensions to obtain square pixels when the user requests
proportional scaling through either of the w/h expressions or
force_original_aspect_ratio.

Output SAR is always reset to 1.

Option added to scale, scale_cuda, scale_npp & scale_vaapi.

libplacebo already has a similar option with different semantics,
scale_vt and scale_vulkan don't implement force_oar, so for these
three filters, I've made minimal changes needed to not break building
or change output.
2025-02-10 16:25:23 +05:30
9fb806fa57 avcodec: add AV_CODEC_ID_IVTV_VBI
IVTV, a Linux driver for TV tuners, and V4L2 utilize
a coding named after IVTV to carry sliced VBI data
in MPEG streams produced by tuner cards with
VBI capture capability and an MPEG-2 encoder SoC.

IVTV or V4L2 driver will transport the coded data into a
MPEG-PS private stream ("IVTV") that can be captured
from the card alongside the video/audio.

The data could include:
EIA-608, Teletext, WSS (PAL widescreen signaling),
or VPS (PAL VCR signaling).

Signed-off-by: Marth64 <marth64@proxyid.net>
2025-02-09 20:27:49 -06:00
4d9cdf82ee doc/t2h: Support texinfo 7.1 and 7.2 pretest
Here is a proposed patch for portability of doc/t2h.pm for GNU Texinfo
7.1 and 7.1.90 (7.2 pretest).  I tested against 7.1 and 7.1.90 (7.2
pretest).  There is a difference in the headings compared to the website
version, maybe related to FA_ICONS not being set the same, but the
result seems correct.

I also renamed $element to $output_unit in ffmpeg_heading_command as in
new equivalent makeinfo/texi2any code the $element variable is the
$command variable in ffmpeg_heading_command, which is very confusing.  I
left as is the $command variable to have a patch easier to read, but it
could make sense to rename $command as $element later on.

The patch could also have effects with Texinfo 7.0, since some of the
changes are for that version, but that probably never show up because it
is for situations that may not exist in ffmpeg manuals (for example
@node without sectioning command), or because the code is robust to some
missing information (case of $heading_level in ffmpeg_heading_command
that was not set, as far as I can tell).

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-06 18:00:34 -03:00
a8595dae0f doc/ffmpeg: update example command line for IAMF muxing
Missed in 8f6a1a06a692f39abde24e09fecc3de26935657d.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-02-04 13:48:11 -03:00
1f94cc4588 doc/filters: Add documentation for AMF filters
Signed-off-by: Evgeny Pavlov <lucenticus@gmail.com>
2025-02-04 00:14:14 +01:00
221816456a doc/filters: fix typo in format filter
The inline example for option color_ranges used 'color_spaces'

Fixes #11441
2025-01-31 23:15:40 +05:30
959b799c8d avfilter/setpts: add option strip_fps to decide framerate handling
In f121d95, the outlink framerate was unconditionally unset.
This breaks/bloats outputs from CFR muxers unless the user explicitly
sets a sane framerate. And the most common invocation for setpts seen in
workflows, our docs and across the web is `PTS-STARTPTS` or others of the
general form `PTS+constant` which preserves the input framerate.

Default value is false, which restores old behaviour.

Fixes #11428
2025-01-27 15:40:09 +05:30
712140be75 doc/APIChanges: fix library name for a recent entry
Signed-off-by: James Almer <jamrial@gmail.com>
2025-01-25 21:56:49 -03:00
ea3c3b42df avutil/frame: add a side data prop to signal channel layout dependent types
Signed-off-by: James Almer <jamrial@gmail.com>
2025-01-25 21:56:49 -03:00
6707d970c0 avfilter/buffersink: add av_buffersink_get_side_data()
This will be used to get global side data that was propagated through the
filterchain.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-01-25 21:56:49 -03:00
7a025e1cb5 avfilter/buffersrc: add a side_data field
This will be used to propagate global side data through the filterchain.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-01-25 21:56:49 -03:00
ef1cb1c9c8 avfilter/avfilter: add a side_data field to AVFilterLink
This will be used to propagate global side data through the filterchain.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-01-25 21:56:49 -03:00
91d96dc8dd avformat/hls: Be more picky on extensions
This blocks disallowed extensions from probing
It also requires all available segments to have matching extensions to the format
mpegts is treated independent of the extension

It is recommended to set the whitelists correctly
instead of depending on extensions, but this should help a bit,
and this is easier to backport

Fixes: CVE-2023-6602 II. HLS Force TTY Demuxer
Fixes: CVE-2023-6602 IV. HLS XBIN Demuxer DoS Amplification

The other parts of CVE-2023-6602 have been fixed by prior commits

Found-by: Harvey Phillips of Amazon Element55 (element55)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-01-26 01:12:28 +01:00
2ac2ebcd76 doc/protocols: fix/improve RTP documentation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-01-17 23:33:26 +01:00
42e72d5c8b avutil/frame: add AV_FRAME_SIDE_DATA_FLAG_NEW_REF
The flag is documented but did not exist. So introduce it as it can be
useful.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-01-10 15:02:22 -03:00
19c95ecbff avcodec: deprecate AVCodecContext properties
These properties are unreliable because they depend on the frames decoded so
far, users should check directly the presence of the decoded AVFrame side data
or AVFrame flags.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-01-05 22:25:29 +01:00
8a29b4e38d fftools/ffprobe: print lossless frame flag
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-01-05 22:23:16 +01:00
2d91f89445 avcodec/frame: add AV_FRAME_FLAG_LOSSLESS
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-01-05 22:23:15 +01:00
f3c4082645 avcodec/libjxl: add animated JPEG XL encoder
libjxl supports animated encoding, so we add a wrapper to the
library using the receive_packet callback method.

This code was based largely on a patch sent by Zsolt Vadász,
although it was updated to use more recent coding practices
and many of the leaks and issues were fixed.

Reviewed-by: Marth64 <marth64@proxyid.net>
Co-authored-by: Zsolt Vadász <zsolt_vadasz@protonmail.com>
Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-01-03 19:37:28 -05:00
da9dcaba69 avutil/channel_layout: add a 5.1.2 layout using side channels
And rename the existing 5.1.2 to explicitly state it contains back channels.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-01-03 10:27:12 -03:00
6ffbc22b53 doc/ffmpeg.texi: replace use of uncommon unicode characters
Addresses ticket #11372

Signed-off-by: James Almer <jamrial@gmail.com>
2024-12-26 13:41:28 -03:00
b88944a8aa avutil/frame: add av_frame_side_data_remove_by_props()
As discussed in the previous commit, we often need a convenient way of
stripping all side data related to a certain aspect of the frame. This helper
accomplishes just that.

I considered also adding a way to match only side data matching *all*
properties, but I think this is sufficiently useless in practise to not warrant
inclusion in the API.
2024-12-23 14:22:56 +01:00
3428a8d830 avutil/frame: add AV_SIDE_DATA_PROP_{SIZE,COLOR}_DEPENDENT
Many filters modify certain aspects of frame data, e.g. through resizing
(vf_*scale* family), color volume mapping (vf_lut*, vf_tonemap*), or
possibly others.

When this happens, we should strip all frame side data that will no
longer be correct/relevant after the operation. For example, changing
the image size should invalidate AV_FRAME_DATA_PANSCAN because the crop
window (given in pixels) no longer corresponds to the actual image size.
For another example, tone-mapping filters (e.g. from HDR to SDR) should
strip all of the dynamic HDR related metadata.

Since there are a lot of different side data types that are affected by such
operations, it makes sense to establish this information in a common, easily
accessible way. The existing side data properties enum is a perfect fit for
this.
2024-12-23 13:33:33 +01:00
b7a2333357 avfilter/vf_scale: add colorspace and transfer property options
In the long run, it would be ideal if we could add these to the avfilter
negotiation as well, but for now, this is a good start.
2024-12-23 12:33:43 +01:00
45f0a7ad33 swscale: add ICC intent enum and option
This setting can be used to infuence the type of tone and gamut mapping used
internally when color space conversions are required. As discussed at VDD'24,
the default was set to relative colorimetric clipping, which is approximately
associative, surjective and idempotent. As such, it roundtrips well, although
it is strictly speaking not associative on out-of-gamut colors.
2024-12-23 12:33:43 +01:00
c3083b3266 avcodec: add ADPCM IMA XBOX decoder 2024-12-22 16:08:33 +11:00
2ac34d0854 lavc/packet: add API for an AVPacket-based AVContainerFifo 2024-12-15 14:05:33 +01:00
2e956d9c0f lavc/container_fifo: move to lavu and make public
This can be useful in other places, e.g. it can replace objpool in
fftools.

The API is modified in the following nontrivial ways:
* opaque pointers can be passed through to all user callbacks
* read and write were previously separate callbacks in order to
  accomodate the caller wishing to write a new reference to the FIFO and
  keep the original one; the two callbacks are now merged into one, and
  a flags argument is added that allows to request such behaviour on a
  per-call basis
* new peek and drain functions
2024-12-15 14:05:15 +01:00
56ba57b672 lavc/refstruct: move to lavu and make public
It is highly versatile and generally useful.
2024-12-15 14:03:47 +01:00
90af8e07b0 fftools/ffprobe: add analyze_frames option for CC and grain detection
Currently, ffprobe has two stream-level fields that do not work,
closed_captions and film_grain).

Their value is always 0 because ffprobe cannot access the internal
codec properties when it is setting up its stream contexts.

In this commit, add the new option -analyze_frames to ffprobe,
allowing the user to read frames up to the interval they have defined
and fill these fields based on what is exposed in AVPacketSideData.

Additionally, in the same commit, don't write these fields to
the output unless analyze_frames is enabled. Finally, fix the
FATE test refs accordingly and update the docs.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-12-13 22:41:31 -06:00
6eb4bf04e9 avutil/channel_layout: add a 9.1.6 layout
Signed-off-by: James Almer <jamrial@gmail.com>
2024-12-13 16:35:47 -03:00