1762 Commits

Author SHA1 Message Date
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
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
519d406ce9 doc/APIchanges: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-08-09 17:26:13 +02:00
1c85a3832a lavc: add API for manipulating SMPTE-436M VBI/ANC data
Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
2025-08-08 03:04:42 -07:00
a566fcb9dc lavf: mxf [de]muxer now uses AV_CODEC_ID_SMPTE_436M_ANC instead of ..._NONE
this makes it easier to match against when using that format from other parts of ffmpeg.

Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
2025-08-08 03:04:40 -07:00
f4ff379bae lavc: add AV_CODEC_ID_SMPTE_436M_ANC
This creates a new codec id for mxf vbi_vanc_smpte_436M streams.
This makes it easier to use from other [de]muxers and bitstream filters.

It's just the data in Table 7 (starts on page 13) of:
https://pub.smpte.org/latest/st436/s436m-2006.pdf

Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
2025-08-08 03:02:57 -07:00
83b36f5410 lavc: bump minor version and add APIChanges entry for ProRes RAW 2025-08-08 01:06:11 +09:00
262d41c804 all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
119d127d05 lavu/spherical: Add support for Spherical Immersive type 2025-07-31 10:58:36 +02:00
157d3b007e lavu: add av_scanf_format() and use it on av_sscanf()
Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-22 01:35:01 +02:00
fbda5ffb95 avutil/hwcontext: Add ohcodec device and pixel format
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-07-18 14:44:39 +08:00
b24155cae1 avfilter/avfilter: add AVFilterGraph->max_buffered_frames to limit buffered frames
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-14 22:05:10 +02:00
934e1c23b0 APIchanges: Add entry for AV_PKT_DATA_RTCP_SR 2025-07-07 17:19:44 +02:00
11d1b71c31 doc/APIchanges: add missing entries for the recent changes
Signed-off-by: James Almer <jamrial@gmail.com>
2025-07-01 23:28:24 -03:00
004cc60f0e avutil/avassert: Add av_unreachable() and av_assume() macros
Useful to let the compiler and static analyzers know that
something is unreachable without adding an av_assert
(which would be either dead for the compiler or add runtime
overhead) for this.
The implementation used here enforces the use of a message
to provide a reason why a particular code is supposed to be
unreachable.

Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 10:45:23 +02:00
e2f39671ae avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx()
Signed-off-by: softworkz <softworkz@hotmail.com>
2025-05-15 23:04:44 +02:00
bf1579c904 avutil/log,hwcontext: Add AV_CLASS_CATEGORY_HWDEVICE
Signed-off-by: softworkz <softworkz@hotmail.com>
2025-04-21 00:19:11 +02:00
afe6c1238a libpostproc: update APIChanges and version for "deprecate the AMD 3DNow"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-16 13:59:15 +02:00
f3f1a48a07 APIChanges & version bump for AV_DICT_DEDUP
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-07 01:46:05 +02:00
b338d1b35b libs: bump major version for all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2025-03-28 14:44:34 -03:00
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
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
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
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
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
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
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
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
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
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
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
06f084468e avutil/csp: add EOTF function definitions
The existing av_csp_trc_func_from_id() mostly implements the OETF, except for
PQ. As such, we are currently missing a precise definition of an ITU-R EOTF.
Introduce the new functions av_csp_itu_eotf() and av_csp_itu_eotf_inv(), to fill
this void. Note that this is not possible in all cases, e.g. AVCOL_TRC_LOG which
has no corresponding EOTF definition in any ITU-R standard.

Note that we cannot implement the proper HLG and SMPTE 428 OOTFs without access
to all three color channels, because they are not independent per channel. As a
result, we need to define them on double[3] instead of double (*func)(double).
2024-12-05 12:27:32 +01:00
bf0a6c4111 avutil/csp: add av_csp_trc_inv_from_id()
Mathematical inverse of av_csp_trc_from_id(), plus testing to make sure it
roundtrips correctly with the corresponding TRC.
2024-12-05 12:26:49 +01:00
2a091d4f2e swscale: introduce new, dynamic scaling API
As part of a larger, ongoing effort to modernize and partially rewrite
libswscale, it was decided and generally agreed upon to introduce a new
public API for libswscale. This API is designed to be less stateful, more
explicitly defined, and considerably easier to use than the existing one.

Most of the API work has been already accomplished in the previous commits,
this commit merely introduces the ability to use sws_scale_frame()
dynamically, without prior sws_init_context() calls. Instead, the new API
takes frame properties from the frames themselves, and the implementation is
based on the new SwsGraph API, which we simply reinitialize as needed.

This high-level wrapper also recreates the logic that used to live inside
vf_scale for scaling interlaced frames, enabling it to be reused more easily
by end users.

Finally, this function is designed to simply copy refs directly when nothing
needs to be done, substantially improving throughput of the noop fast path.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-11-25 11:03:50 +01:00
fb16964009 swscale: organize and better document flags
Group them into an enum rather than random #defines, and document their
behavior a bit more obviously.

Of particular note, I discovered that SWS_DIRECT_BGR is not referenced
anywhere else in the code base. As such, I have moved it to the deprecated
section, alongside SWS_ERROR_DIFFUSION.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-11-25 11:02:12 +01:00
ed5dd67562 swscale: expose SwsContext publicly
Following in the footsteps of the work in the previous commit, it's now
relatively straightforward to expose the options struct publicly as
SwsContext. This is a step towards making this more user friendly, as
well as following API conventions established elsewhere.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-11-25 10:59:49 +01:00
46cb7b8d9d avutil/frame: also align data pointers in av_frame_get_buffer()
This avoids unpleasant surprises to av_frame_get_buffer callers
that explicitly specified 64-byte alignment and didn't get
AVFrame.data pointers that are 64-byte aligned.

For example, see https://github.com/sekrit-twc/zimg/issues/212

Although the zscale issue has already been resolved by other means
it would still be prudent to improve the behavior of av_frame_get_buffer
to fix any unknown and future instances of similar issues.

Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-22 10:43:55 -03:00