1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00
Commit Graph

1867 Commits

Author SHA1 Message Date
Michael Niedermayer
e525b51aa0 doc/APIchanges: fill in missing things
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-10-23 06:44:02 +02:00
Michael Niedermayer
b8249f73a7 avutil/hwcontext: add av_hwframe_get_transfer_buffer()
It allocates the buffers of a software frame used for a transfer to or
from a hardware frames context out of a pool kept by that context.

Assisted-by: Claude
2026-10-21 19:32:23 +00:00
Michael Niedermayer
d1434518fb avutil/encryption_info: add av_encryption_init_info_append_side_data()
Appends to already serialized init info side data, growing it with
av_fast_realloc(), so a demuxer can collect pssh records in linear time
without depending on the side data format.
2026-10-19 17:14:29 +02:00
Tom Needham
0ec6a0872d libavcodec: Add Infinity IMM6 Decoder
Signed-off-by: Tom Needham <06needhamt@gmail.com>
2026-10-18 20:57:48 +00:00
Michael Niedermayer
dfaa3ba5f3 avformat/avio: add avio_open_dir2() with an interrupt callback
A directory listing that blocks in a protocol could not be
interrupted; avio_open_dir2() passes an interrupt callback to the
protocol like avio_open2() does.

Assisted-by: Claude
2026-10-18 03:19:28 +00:00
James Almer
2ac7367f2f avutil/gain_map: move ISO 21496-1 gain map payload parsing from libavcodec
And export both functions. This is needed for a following change that will make
use of these functions from lavf.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:10 -03:00
James Almer
546cf7181d avcodec/packet: add a Gain Map parameters side data type
Mirroring the frame one. Will be used by demuxers as stream or stream group
side data.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:37:15 -03:00
James Almer
184d925444 avformat: add side data fields to Stream Groups
Deprecate the Tile Grid specific ones, while keeping it in sync with the new
fields until removed.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:18 -03:00
Lynne
e7420679a3 lavu/raw_color_params: add Panasonic RW2 parameters
The as-shot white balance of RW2 files, as red and blue multipliers
relative to green. The files carry no camera matrix.
2026-10-08 14:21:36 +09:00
Lynne
a796d86a30 lavc: add a Panasonic RW2 codec ID 2026-10-08 14:21:32 +09:00
James Almer
7304d10462 avutil/opt: add a serialization flag to exclude options with specific flags
Useful for example for scenarios like wanting to serialize only options that
are not marked as deprecated.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-07 18:40:30 -03:00
Lynne
2983c23762 avutil: add AV_PIX_FMT_XYZP12
Planar 12-bit XYZ, the natural planar layout for DCI JPEG2000 content.
Also wire it into the Vulkan format table and shader format helpers.
2026-10-06 13:31:37 +09:00
James Almer
b2f001ae9a avformat/version: properly bump version for Gain Map stream group
The version was mistakenly reverted from 63.7.101 to 63.7.100 in commit
caa5824750.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-04 13:59:12 -03:00
Kacper Michajłow
30e7a93bee avfilter/buffersink: add support for chroma locations
Lets the caller read back the negotiated chroma location and constrain the
sink to a list of accepted ones.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-10-01 14:31:15 +00:00
Kacper Michajłow
f3d2f99263 avfilter/buffersrc: add chroma_location parameter
Lets the caller state the chroma siting of the frames it feeds in, which is
what the rest of the graph negotiates against. A tagged source constrains
the link to its own value, an untagged one places no constraint at all,
there being nothing to convert from.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-10-01 14:31:15 +00:00
Kacper Michajłow
c200628eac avcodec: add AV_CODEC_CONFIG_CHROMA_LOCATION
Lets an encoder state which chroma sample locations it can accept, so the
caller can convert to one.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-10-01 14:31:15 +00:00
Kacper Michajłow
08a654a564 avfilter: add link negotiation for AVChromaLocation
Chroma sample location is the last of the video colorimetry properties
without a negotiated link value, so nothing downstream can ask a filter for
a particular siting and no encoder can constrain the graph. Add it alongside
the existing color space, color range and alpha mode negotiation.

Merge conflicts are resolved by inserting a scale filter, the same way as
for color space and color range.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-10-01 14:31:15 +00:00
Niklas Haas
caa5824750 avformat: add AV_STREAM_GROUP_PARAMS_GAIN_MAP
To identify ISO 21496-1 gain maps.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-09-30 14:37:55 +02:00
Niklas Haas
b917a0fe1e avutil/gain_map: add AVGainMapParams and side data type
This commit just adds the public facing struct definitions and side data.
The struct follows ISO 21496-1 exactly, with a validation function to check
for representable and legal values.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-09-30 14:37:26 +02:00
James Almer
c6ea3979ef doc/APIchanges: add entries and version bump for the recent commits
Accidentally forgotten in the corresponding changes.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 20:32:38 -03:00
Kacper Michajłow
dea75789c3 avutil/file: add av_file_map_shared() and av_file_unmap_shared()
av_file_map() maps a private copy of a file by name. Code that shares a
file between processes needs the opposite, a writable mapping backed by
the file, of a descriptor it opened itself, that grows with the file.
Provide it with mmap() on POSIX and with a file mapping object on
Windows, which also extends the file to the requested size.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-09-23 16:50:45 +02:00
Jun Zhao
6e9100c648 lavc: add ASTC encoder/decoder via libastcenc
Add the ASTC codec ID and descriptor together with encoder and decoder
wrappers for Arm's astc-encoder library. Support the four ASTC profiles,
2D and 3D block footprints, LDR RGB/RGBA input, and floating-point HDR
input without clamping the decoded result to 8-bit.

Keep the ASTC image dimensions and compressed block sizes bounded by the
format and packet limits, and pass KTX-provided color profile metadata to
the decoder when no explicit profile was selected.

libastcenc is distributed under the Apache License 2.0, so the library is
only available when FFmpeg is built with --enable-version3; list it with
the other libraries that require that option.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2026-09-14 12:44:07 +00:00
yuanjia
c2bb5aa8d8 avcodec/riscv: add vector FDCT implementation
This RVV FDCT is ported from the AArch64 NEON implementation in
libavcodec/aarch64/fdctdsp_neon.S, which is based on libjpeg-turbo.
The original license notice is retained in the assembly file.

Requires RVV 1.0 with 64-bit element support (Zve64x) and VLEN >= 128.
Achieves approximately 3.29x speedup on SG2044 (VLEN=128).

Add FF_DCT_RVV to the public API, bump minor version, and add
Doxygen documentation.

Also:
- Fix include guard in riscv/fdct.h to match file path.
- Use AV_CPU_FLAG_RVV_I64 in automatic dispatch to avoid illegal
  instruction on Zve32x-only CPUs.

Signed-off-by: yuanjia <yuan.jia@sanechips.com.cn>
2026-09-11 15:59:03 +00:00
Zhao Zhili
903325e279 avcodec/mediacodec: document the ENOENT return of buffer release
053585bc91 made rendering an already released buffer return
AVERROR(ENOENT), but left the function description saying that
subsequent calls have no effect. It also omitted the API change entry.
2026-09-09 11:29:23 +08:00
Kacper Michajłow
655dc1af76 avutil/samplefmt: add AV_SAMPLE_FMT_DSD
DSD (Direct Stream Digital) is one-bit sigma-delta modulated audio,
found on Super Audio CDs and in DSF/DSDIFF files. libavcodec has
several decoders producing it internally (dsd_*, dst, wavpack DSD),
each converting to float PCM as part of decoding, which makes the
bitstream itself inaccessible to API users.

Add a dedicated sample format so raw DSD can be carried through the
pipeline, e.g. for bit-perfect pass-through to DSD capable DACs.

The format has no planar variant, altform references itself.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-09-06 00:48:24 +02:00
Michael Niedermayer
359bd3b8af avcodec: add AVCodecContext.skip_pred
Skipping prediction complements skip_idct and skip_loop_filter: with
both skip_pred and skip_idct discarding a frame, no pixel of that frame
is needed, so a decoder can drop all pixel operations and output the
frame with only its metadata valid. This allows callers to determine
timestamps, frame types and the reorder delay of a stream at a small
fraction of the cost of a full decode.
2026-09-05 01:38:48 +00:00
guy-with-a-why
74f1a4a160 avcodec: add FF_BUG_H264_DP_NNZ
9.2.1 makes an inter neighbour unavailable for the coeff_token nC
derivation under constrained intra prediction with slice data
partitioning, and step 7 then drops it from the (nA + nB + 1) >> 1
average. JM instead treats it as available with nN = 0, so it still
contributes. Every partitioned stream in the wild comes from JM or a
derivative, so the decoder has to be able to do both.

Signed-off-by: guy-with-a-why <aaron@iterationlab.io>
2026-08-31 18:13:21 +00:00
James Almer
0e45eebe49 avutil/channel_layout: remove back suffix from some layouts
The idea was for the suffix to refer to the fact they feature Top Back channels
instead of Top Side, but this distinction is unnecessary given there's no
confusion between back and side like with base level channels (Ls/Rs, Lss/Rss,
Lrs/Rsr), nor known specs where Top Side channels are used without Top Back
also being used.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-08-23 13:28:20 -03:00
James Almer
763c3356f1 avcodec/codec: rename encoder reconf codec cap
It was commited only a day ago, and the new name is more accurate, so this change should be safe.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-08-14 10:31:57 -03:00
James Almer
3776aadf4b avcodec/encode: add a function to gracefully reconfigure an encoder
In some cases there are compression and resource usage benefits from changing
certain encoder values at runtime over of closing, freeing, allocating and
initializing a whole new encoder. The most obvious case is rate control,
quality settings, and so on. As such, this commit introduces a new function
that attempts to reconfigure an opened encoder with a dictionary of options.

Private options that can be changed are flagged with the runtime AVOption flag.
Global options that can be changed, knowing that each encoder may support some
but not others and as such can't be flagged in the global AVOptions struct,
are signaled the same way through a new field in the FFCodecDefault struct.

An encoder may provide a callback function that will be called for the
reconfiguration process. Simple encoders that can work with only the AVOptions
being reset and don't require any extra steps may just let the default function
be called instead.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-08-13 11:03:51 -03:00
Romain Beauxis
e5ecfe8970 avformat/id3v2: make legacy COMM descriptor-as-key behavior opt-in
A COMM frame carries both a language and a short content descriptor, so its
only unambiguous metadata key is "comment-<descriptor>-<lang>", while the
extra export of the bare descriptor as a key silently overrides a real tag
whenever the descriptor matches a known tag name such as "album".

Restrict that legacy export to the container-level ID3v2 tag of callers that
ask for it through the new AVFMT_FLAG_LEGACY_ID3V2_COMM_KEYS flag (-fflags
+legacy_id3v2_comm_keys), which is deprecated along with
FF_API_OLD_ID3V2_COMMENT and only exists to give those callers a transition
path.
2026-08-12 12:39:44 +00:00
Kacper Michajłow
047eb18451 avcodec: add PCM DVD-Audio decoder
Decodes the LPCM variant found in DVD-Audio AOB streams. Unlike
DVD-Video LPCM it supports up to 192 kHz sample rates and splits
channels in two channel groups, which may use different quantization.
Samples are grouped in sets of 2 samples over all channels, with the
second channel group's data stored first within each set, as 16-bit
big-endian most significant parts followed by the remaining bits.

Based on information from expired US 6,580,671 patent et al.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-07-28 17:54:07 +02:00
Romain Beauxis
b0c702aec2 libavformat/id3v2: deprecate legacy COMM descriptor-as-key behavior 2026-07-18 09:59:57 -05:00
Timo Rothenpieler
ef3dcf4ea6 avutil/hwcontext_cuda: add CUarray surface pool support
Extend the internal CUDA frames context (CUDAFramesContext) to manage
block-linear CUarray surfaces alongside the existing pitched-linear
allocations.

When the frames context format is AV_PIX_FMT_CUARRAY, the caller
(e.g. NVDEC) can fill cuarray_desc and cuarray_num_surfaces before
calling av_hwframe_ctx_init(), which then allocates the CUarray
surfaces.

Also add cuda_transfer_data_from_cuarray() to support hwdownload
from CUarray frames to host memory via cuMemcpy2DAsync.

Co-authored-by: Diego de Souza <ddesouza@nvidia.com>
Signed-off-by: Diego de Souza <ddesouza@nvidia.com>
2026-07-14 19:45:02 +00:00
Diego de Souza
c7546ce0ea avutil/pixfmt: add AV_PIX_FMT_CUARRAY for opaque CUDA block-linear surfaces
Add a new hardware pixel format representing opaque block-linear CUDA
arrays (CUarray). This format is used by NVDEC when decoding into
opaque surfaces registered with cuvidRegisterDecodeSurfaces, and can
be consumed directly by NVENC as CUDA array input without requiring
a pitch-linear copy.

Signed-off-by: Diego de Souza <ddesouza@nvidia.com>
2026-07-14 19:45:02 +00:00
James Almer
7e68fdd4da avutil/frame: add a new side data type for downmix matrix
Signed-off-by: James Almer <jamrial@gmail.com>
2026-07-11 19:32:17 -03:00
James Almer
56e39bd20b avutil/downmix_info: add a new API to propagate pre-made downmix matrixes
Useful for formats where they provide the downmix matrix in the bistream rather
than scale factors for channel groups.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-07-11 19:32:17 -03:00
Vignesh Venkat
7c4e41b54c avcodec: Add itut-t35 metadata as a codec type
Signed-off-by: Vignesh Venkat <vigneshv@google.com>
2026-07-10 01:56:22 +00:00
James Almer
32a256f619 avcodec: add a graph based bitstream filtering API
Tagged experimental for now, as it may see modifications depending on
requirements.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-07-06 13:26:02 -03:00
Michael Niedermayer
b140509940 pre branch Update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-06-26 02:26:01 +02:00
Andreas Rheinhardt
762b94e672 libs: Bump major version of all libraries
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-23 19:15:57 +02:00
Lynne
61693f6c35 hwcontext_vulkan: switch to VkAccessFlagBits2 2026-06-23 19:15:57 +02:00
Andreas Rheinhardt
191be14fb6 avcodec/packet: Accept const dictionaries in av_packet_pack_dictionary()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-23 19:15:57 +02:00
Lynne
12dc67b6fe lavu/frame: add camera raw codec side data
Required to correctly present raw video.
Codec-specific since I'd like to support ARRIRAW in the future, which
has a different format.
2026-06-10 02:38:35 +09:00
Niklas Haas
972c0cf91f swscale: add new SwsContext.backends option
This allows constraining the set of available backends. This serves as a
better replacement for the "unstable" flag, which is a bit ambiguous. Allows
users to, for example, opt into the memcpy or x86 backend, while excluding
e.g. the upcoming JIT backends.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-03 21:39:55 +00:00
Niklas Haas
9fe5758da5 avutil/hwcontext_vulkan: publicly expose queue device creation flags
These are needed for interop with e.g. libplacebo, which needs to know the
correct flags to call vkGetDeviceQueue2.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-02 13:32:43 +02:00
James Almer
f778a7e241 avformat: deprecate AVStreamGroupLCEVC
It's been replaced with AVStreamGroupLayeredVideo, which is functionally the
same while generic enough to be shared with other kinds of layered video
implementations.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper Michajłow
d7c7ee4e2e avformat: add AV_STREAM_GROUP_PARAMS_DOLBY_VISION
This uses existing AVStreamGroupLayeredVideo.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Kacper Michajłow
1e3883df9f avformat: rename AVStreamGroupLCEVC to AVStreamGroupLayeredVideo
It will be reused for other similar groups.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-05-31 03:43:29 +00:00
Romain Beauxis
5f6dff5e7d avcodec/packet: add AV_PKT_DATA_HEVC_CONF side data type
Carries a raw HEVCDecoderConfigurationRecord for the Dolby Vision
enhancement layer, parsed from the hvcE box (ISOM) or the corresponding
BlockAdditionMapping (Matroska).
2026-05-30 17:37:28 +00:00