100 Commits
Author SHA1 Message Date
James Almer 38c6f36f93 tests/fate/ffmpeg: add a test for alpha merging in ffmpeg.c
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-26 21:06:49 -03:00
James Almer ceb466cbcd avfilter/avfiltergraph: call print_filter_formats with TRACE log level
It's way too noisy for debug level.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-26 13:14:21 +00:00
James Almer 5f0a7701c1 Bump minor after branching release/9.1
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-24 17:05:20 -03:00
James Almer aecf409c18 Bump minor version for release/9.1
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-24 17:05:20 -03:00
James Almer b331ea1fb1 doc/APIchanges: fill in missing things
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-24 17:05:20 -03:00
James Almer 2235624dbb Changelog: move jpeg-mpf demuxer to the 9.1 section
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-24 17:05:20 -03:00
James Almer 598857bf35 test/fate/preroll: fix parsing entries in preroll.ffconcat when using relative path for the samples suite
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 19:49:55 -03:00
James Almer c4c791c2cd tests/fate/mov: add a test for Alpha layer HEIF images
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:12 -03:00
James Almer bd030344b7 fftools/ffmpeg_demux: automatically apply Alpha layer on Alpha Stream Group input
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:12 -03:00
James Almer c2c30b7b30 fftools/ffmpeg_filer: ensure all internal filtergraphs are removed if their outputs are unbound
If an internal filtergraph that's removed references another internal
filtergraph, we need to do another dry run to ensure said internal filtegraphs
it referenced are still needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:12 -03:00
James Almer b938b5c8e4 avformat/mov: simplify setting Exif side data
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:12 -03:00
James Almer 5c83e281e6 avformat/mov: export Alpha type Stream Groups
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:12 -03:00
James Almer fd56ed17ca avformat/mov: fix parsing auxl derived layered video stream groups if they don't reference a tile grid
mov_parse_heif_layered_video() needs to be called even if nb_heif_group is 0,
otherwise auxl derived groups might be skipped.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:12 -03:00
James Almer e88ef42af1 avformat/dump: print Alpha channel Stream Group information
And merge all the Layered Video based group types into a single block.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:12 -03:00
James Almer e5605b4bb4 avformat: add an split Color and Alpha channel Stream Group
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-23 11:22:05 -03:00
James Almer db21684c3a avcodec/version: fix minor version
It was wrongly reduced in 0ec6a0872d.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-22 17:44:38 -03:00
James Almer 9e6f96bac1 avformat/movenc: wrap AVIF specific functions with a preprocessor check
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-21 18:35:41 -03:00
James Almer bcb0ac1d9d avformat/movenc: flag the alpha image in AVIF as hidden
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-21 18:35:41 -03:00
James Almer 7461dbcb55 avformat/movenc: use bitstream information to write AVIF parameters if needed
If the pixel format is a hardware one, components will be unset, and we will
end up writing an invalid pixi box.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-21 18:35:41 -03:00
James Almer e4eee6c222 tests/fate/mov: add a simple muxing test for AVIF
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-21 18:35:41 -03:00
James Almer 3b3dc211fe avformat/mov: don't error out on invalid gain map payloads
Unless it's requested by the user's compliant level.
Allows demuxing some seemingly non spec-compliant files in the wild again after
the recent Gain Map support addition.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-20 21:23:04 -03:00
James Almer 8ec2b44cfd avformat/mov: fix gain map payload length value
We discard the first byte from the payload, so take that into account afterwards.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-20 21:23:04 -03:00
James Almer 94cba3150c avcodec/bsf/jpegapp: use an AVOption of binary type for the sidecar
Opening a file for this is hacky and the tests added for it are broken on Windows.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-17 15:49:47 -03:00
James Almer 2fd864c2e9 tests/fate/lavf-container: add tests for dual-track LCEVC remuxing
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-16 14:39:39 -03:00
James Almer bf43f4b3cf avformat/mpegtsenc: add support for muxing LCEVC streams
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-16 14:39:39 -03:00
James Almer 0b19c65afe avcodec/lcevcdec: propagate color related frame fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-16 14:27:26 -03:00
James Almer 1993696503 doc/ffprobe.xsd: fix syntax for stream groups after recent changes
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-16 14:17:48 -03:00
James Almer 513df1ccdd avformat/mov: split off ipco and ipma box parsing to their own functions
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-15 17:50:19 -03:00
James Almer 03405b27ff avformat/mov: remove auxl references from gain maps already applied with a tmap derived image
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-13 19:44:32 -03:00
James Almer 263f271422 avformat/options: fix avformat_stream_group_add_stream() memory leak on failure path
Introduced in 8b577f90f3

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 18:30:17 -03:00
James Almer 4a12252044 tests/fate/mov: add a test for HEIF with Gain Map derived image
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 686b79d469 avformat/mov: support exporting Apple gain maps as Stream Group
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 06af0fdbf7 avformat/mov: split parsing and applying Exif item metadata
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 00249664de avformat/mov: support exporting derived images of type tmap as Gain Map Stream Groups
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 3a4bbdc2d8 avformat/mov: rename HEIFGrid to HEIFGroup
It will be used to store information about other kinds of derived
images in the following commits.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 034a53bd6e avformat/mov: simplify the loop in mov_parse_tiles()
Use the get_heif_item() helper to query items.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 626b8aa343 avformat/mov: factorize setting item output metadata
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 00b00ad583 fftools/ffprobe: print stream groups with a type using AVStreamGroupLayeredVideo
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer f9fcdfe11f fftools/ffprobe: print Gain Map Parameters packet side data
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 8411f7b352 fftools/ffprobe: differentiate between stream/group_stream/program_stream side data
And fully implement printing all their components.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:17 -03:00
James Almer 64d91f9787 fftools/ffprobe: support printing child groups within groups
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:16 -03:00
James Almer b2813dedac fftools/ffmpeg_filter: copy global side data to frames when the source graph is internal
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:39:16 -03: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 409351e5eb avformat/dump: print Gain Map Parameters side data
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:37:31 -03:00
James Almer 6a4f712549 avformat/dump: Support printing child groups within a group
Only for Layered Video of Gain Map type for now.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:37:31 -03:00
James Almer e5a3f55c01 avcodec/exif: add Apple iOS MakerNote entry
Used by photos taken with iOS based phones.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:37:31 -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 7c140b5f06 fftools/ffplay: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:26 -03:00
James Almer 7168cd7f70 fftools/ffprobe: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:26 -03:00
James Almer a0979b646b fftools/ffmpeg: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:26 -03:00
James Almer fc5fab9a87 avformat/mov: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:26 -03:00
James Almer 633cd9fecf avformat/mpegts: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:26 -03:00
James Almer 8b1d0643c9 avformat/movenc: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:26 -03:00
James Almer 03801cb90f avformat/matroskadec: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:26 -03:00
James Almer 7307377729 avformat/jpegmpfenc: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:25 -03:00
James Almer d99629eaa4 avformat/iamf: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:25 -03:00
James Almer 25047fb270 avformat/dump: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:25 -03:00
James Almer 028cb6ab7d avformat/demux: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:25 -03:00
James Almer 89ebe00e43 avformat/dashdec: stop using deprecated AVStreamGroup fields
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:36:25 -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
James Almer 8b577f90f3 avformat: allow Stream Group to reference other Stream Groups
Some formats, like ISOBMFF, allow having references between items that we
export as Stream Groups where the entries are other items that we too
export as Stream Groups.

This is implemented in a backwards compatible way, where if a group were
to contain an entry that points to another group, the legacy nb_streams
field will be set to 0 so callers not aware of the new feature don't
attempt to parse the group at all.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-12 10:29:07 -03:00
James Almer e70b1eddba avutil/opt: do not free a custom channel map the source still points to
av_opt_copy() documents that after it returns, allocated options in src
and dst no longer alias each other, even when dst was memdup'ed from src.
For AV_OPT_TYPE_CHLAYOUT it passed such aliased layouts straight to
av_channel_layout_copy(), which frees the custom map in dst and then
copies from the now freed map in src.

Handle this in opt_copy_elem(), like the AV_OPT_TYPE_DICT case, by
forgetting the aliased map in dst before the copy.

Fixes: heap-use-after-free
Fixes: BTOI3sLHWE0g
Found-by: Joshua Rogers <joshua.rogers@aisle.com>
2026-10-10 21:27:56 +00:00
James Almer e0e6ca1e29 avcodec/lcevcdec: add support for passing options
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-08 11:15:10 -03:00
James Almer 6f4d952e60 avcodec: allow adding AVOption enabled but non-public fields to AVCodecContext
Making AVCodecInternal fields AVOption enabled requires extra considerations
in av_codec_context_class, and they will only be settable with an open context
or by passing the options directly as part of avcodec_open2().
They also would require to allow searching children classes, which in the case
of a fake object results in looking at every single underlying decoder/encoder
option.
Instead of that, extend AVCodecContext internally the same way we did for other
contexts like AVFormatContext, and add fields outside the public part.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-08 10:54:39 -03:00
James Almer 7ef5a794c4 avcodec/vorbisenc: fix setting frame_size
It was set to a sub-frame value so the caller would then pass such small frames
to the encoder, which would then get buffered internally before being
processed. Because of this, the actual frame size would not end up being
propagated back to the caller, which resulted in said bogus internal value
being used by muxers.
Set frame_size to the actual final value and adapt the encoder to expect full
frames.

Fixes issue #24899.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-07 21:14:29 -03:00
James Almer 5d4755f7dd fftools/ffmpeg_mux_init: skip deprecated AVOptions when mapping stream groups
Silences warnings about lcevc_index being deprecated when mapping an input
LCEVC stream group.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-07 18:40:39 -03: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
James Almer 3593b81b09 avutil/tests/opt: add more tests for av_opt_serialize flags
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-07 18:34:09 -03:00
James Almer a01246f079 avfilter/vf_gainmap: don't use sizeof(AVGainMapParams)
It's not part of the ABI.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-06 13:24:15 -03: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
James Almer 27f36adf30 avcodec/aacenc: add support for 5.1.6 and 7.1.6 layouts using PCE
Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-04 13:46:09 +00:00
James Almer 935b61a603 avformat/dump: add some indentation to IAMF Audio Element stream lines
Cosmetic change.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-03 17:52:12 -03:00
James Almer 8948fa70d4 avformat/dump: print IAMF Audio Element streams in info log level
They provide info the group itself can't, like underlying audio codec, which is
nice to have available without having to request verbose logging.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-10-03 17:52:12 -03:00
James Almer a7b0af0071 avformat/movenc: reject MPEG-H 3D Audio streams with no extradata
It's not clear if mpegh3daConfigLength is allowed to be 0, so reject it outright.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-30 13:47:06 -03:00
James Almer e4fa18c220 avcodec/libmpeghdec: don't use extradata for streams with in-band config configuration
The decoder seems to accept it but then will not output any frame at all.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-30 13:40:35 -03:00
James Almer 68e78f1826 fftools/ffprobe: make level an optionally print value
Same as profile, if it's unknown, don't print it.
It makes even more sense here given it's not a string, and ffprobe is
printing a "-99" which means nothing to a casual reader.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-28 01:19:30 +00:00
James Almer 939c2c733b tests/fate/ffprobe: update reference file for fate-ffprobe_xsd
Missed in a8e1a613af.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 20:57:07 -03: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
James Almer 282ecdaf76 tests/fate/mov: add tests for MPEG-H audio streams in mp4
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:43:26 -03:00
James Almer c683fc8375 avformat/movenc: support writting mhaC box for MPEG-H streams
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer f216754ad5 avformat/mov: parse mhaC box
Defined in ISO/IEC 23008-3, for MPEG-H streams.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer 8399012415 avcodec/libmpeghdec: make the mask list from channel_layout_to_cicp() a shared table
And move it to mpegaudiotabs.h

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer bf2efe2c7f avcodec/profiles: add MPEG-H 3D Audio profiles
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer 8dfc9f8f6e avcodec/libmpeghdec: remove AV_CODEC_CAP_CHANNEL_CONF capability
The decoder does not set channel layout, and will fail if not set by the caller.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer 29c1349657 avcodec/libmpeghdec: use the new layout defines
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer 5e31ccacab tests/fate/swresample: add rematrix test for the new layouts
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer 30b05343a6 avutil/channel_layout: add 5.1.6 and 7.1.6 layouts
Defined in ISO/IEC 23001-8 Table 9.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:38:11 -03:00
James Almer a8e1a613af fftools/ffprobe: don't print codecpar level for video streams only
It's not documented as being limited to video.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 18:37:06 -03:00
James Almer bfaef02d16 tests/fate/mov: add dependency on samples to some recent tests
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-27 00:03:34 -03:00
James Almer 0d64b5ad6c avformat/binka: support Unreal Engine Bink Audio format variant 2026-09-25 22:12:25 +00:00
James Almer c966a1de0a avcodec/opus/dec: only add offsets to valid channel pointers
Fixes clang-ubsan warning "src/libavcodec/opus/dec.c:187:27: runtime error: applying non-zero offset 96 to null pointer"

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-25 13:48:24 -03:00
James Almer bf9cb9f396 swscale/tests: move rational64 test from avutil
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-24 11:19:35 -03:00
James Almer 1433217d4f swscale/rational64: replace av_ prefix with ff_
Even if not exported in sws, av_ prefixes are normally reserved for public functions.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-24 11:18:49 -03:00
James Almer 7499a8ba58 fftools/ffplay: check that AVFormatContext is set in VideState before deferencing it
Fixes segfault in scenarios like trying to open an invalid path.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-22 15:02:45 -03:00
James Almer 283e08e887 avcodec/decode: ensure decoders using the simple API don't return AVERROR_EOF
FFCodec->cb.decode() decoders should only return bytes consumed or actual
decoding error codecs.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-21 21:23:33 +00:00
James Almer 3bbf175db8 avcodec/tiff: don't return AVERROR_EOF
FFCodec->cb.decode() decoders should only return bytes consumed or actual
decoding error codecs.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-21 21:23:33 +00:00
James Almer 14ef93d14c avcodec/libfdk-aacdec: don't return AVERROR_EOF
FFCodec->cb.decode() decoders should only return bytes consumed or actual
decoding error codecs.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-21 21:23:33 +00:00
James Almer ae9e69781b avcodec/gifdec: don't return AVERROR_EOF
FFCodec->cb.decode() decoders should only return bytes consumed or actual
decoding error codecs.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-21 21:23:33 +00:00
James Almer 23b79c0428 ffplay: merge LCEVC streams into the base stream
Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-21 18:07:40 -03:00
James Almer 95d3d992f5 avformat/avformat: ignore enhancement only streams in av_find_best_stream()
They can't be decoded on their own.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-09-21 18:02:12 -03:00