Commit Graph
2804 Commits
Author SHA1 Message Date
Michael Niedermayer 39bf2a1cfb avcodec/tests: cover hardware encoder timestamp fixup at EOF
Exercise empty input and short streams around the decode delay without requiring hardware. Print results for FATE comparison, including the EOF state and timestamp difference.

Assisted-by: Fairy
2026-11-03 17:19:41 +00:00
Rainbaby 8aff7f9f87 avcodec/cavs_aec: add the AVS1-P16 arithmetic decoder
The Broadcasting profile codes its macroblock layer with the arithmetic
coder of clause 8.4. This is the decoder only; its renormalization loops
end with the buffer, so truncated input terminates.

Signed-off-by: Rainbaby <r@bgr.jp>
2026-11-02 22:18:06 +00:00
Niklas Haas 42344c7cbb avcodec: implement ISO 21496 gain map parsing
The parsing logic for this already existed in libavcodec, but was unused
until now. This commit adds the APP2 extraction logic and the necessary
scaffolding to make this metadata survive the decoder.

Since the base layer of a JPEG Ultra HDR image also contains a stub
copy of the same gain map params struct, we ignore that one here. (It's
only useful for the demuxer, not the decoder)

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-10-23 20:33:53 +00:00
Romain Beauxis 5664e9e97f tests/fate: check that every packet side data type has a handle
Walk all the side data types: each one has to have a handle, which has to
find the type again and not be shared. The handles are compared with the
reference, so that a new type fails the test until it gets one and a
released handle cannot change unnoticed.
2026-10-23 14:04:24 +00: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
Martin Storsjö cc234e7b5b avcodec: Add encoder wrapper for fdk-xhe-aac
This is a new library, separate from the existing fdk-aac (but
built from the same upstream repo), for encoding xHE-AAC.

This library has the same traits as fdk-aac; it's being distributed
from Fraunhofer to Android Open Source Project, and further
repackaged and distributed through opencore-amr [1] (and in a
personal repo on github at [2]). It is distributed under the
same license as fdk-aac.

This is an initial, barebones wrapper around the library - not
all features of the library are hooked up currently.

In particular, do note that the wrapper currently only handles
loudness in the live operating mode (single pass), where encoding
is done with a single loudness level set before encoding. This may
affect the dynamics of the input.

The preferred and intended mode of use for the fdk-xhe-aac encoder
is for it to be used in two pass mode, which handles the loudness
properly. The two pass operation mode is not set up in the
encoder wrapper yet, but may be added later.

[1] https://sourceforge.net/projects/opencore-amr/
[2] https://github.com/mstorsjo/fdk-aac
2026-10-12 22:37:10 +03:00
Lynne 7905079bef lavc: add a Panasonic RW2 parser
Reads IFD0 from the first chunk to set the dimensions and pixel format,
so that probing fills in the stream parameters without decoding a frame.
2026-10-08 14:21:37 +09:00
Lynne a964dc4fc7 lavc: add a Panasonic RW2 decoder
Supports RawFormat 8, used by the S1II, S5II and GH6. Outputs the Bayer
mosaic, with the sensor borders as cropping and the black and white
levels as raw color params side data.

The as-shot white balance (tags 0x24 - 0x26) is exported as
AVRW2RawColorParams, and the TIFF and EXIF tags of IFD0 and its sub-IFDs
as EXIF side data, gathered during the single header walk and attached
without re-parsing. The orientation becomes a display matrix; Panasonic's
raw parameters, the previews and the strip pointers are left out.

The whole file is given as one packet.

Bit-exact with LibRaw on 801 S1II files, at 3x its speed per thread.
2026-10-08 14:21:36 +09:00
Peter Ross c979371025 avcodec/adpcm: ADPCM IMA Citrix decoder 2026-10-04 14:14:32 +00:00
Niklas Haas 1b4ca126d8 avcodec/mjpegenc: add support for writing ISO 21496-1 gain map metadata
This is automatically emitted as an APP2 blob following the ISO 21496-1
specification. To ensure that writing the gain map will succeed, we validate
the paramaters when allocating space, and error out if invalid data is
encountered.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-09-30 14:37:59 +02:00
Peter Ross 060b019b5f avcodec/adpcm: Rhetorex ADPCM decoder 2026-09-28 05:54:41 +00: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 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
Romain Beauxis fda85d16e0 avcodec/mpegaudiodecheader: add avpriv_mpegaudio_decode_header2()
MPADecodeHeader is allocated by callers in other libraries, on the stack
among other places, so fields cannot be added to it. Add MPADecodeHeader2,
which holds every field of the header and which libavcodec itself
allocates, along with a packer turning it back into header bits.

A test program walks the frames of a file, checks that every header
encodes back to its original bits and prints the header fields.
2026-09-19 13:40:52 +00: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
Ayoub Nabil Boubagrat 5339fc6a51 tests/ac3: cover bit allocation
cover band boundaries, partial ranges and exponent limits
before changing the bit allocation code.

Signed-off-by: Ayoub Nabil Boubagrat <237098474+ayoubnabil@users.noreply.github.com>
2026-09-09 18:06:23 +00:00
Kacper Michajłow baa01b0e74 avcodec: add a raw DSD encoder
AV_SAMPLE_FMT_DSD frames are already the bitstream, so the dsd_msbf
"encoder" is a plain copy of the samples into packets.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-09-06 00:48:26 +02:00
Andreas Rheinhardt 89f58356b3 avcodec/tests/encinfo: Convert into API test
It doesn't use any internals of lavc. Converting it to an API
test tool reduces disk usage for shared builds.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-23 13:46:55 +02:00
Andreas Rheinhardt b6e90cc92c avcodec/fmtconvert: Remove now unused subsystem
Unused since 2312ae4d10.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-19 22:25:07 +02: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
Diego de Souza acbaf420aa avcodec/nvdec: register CUARRAY hwaccel variants for all supported codecs
Add CUARRAY hwaccel structs (ff_<codec>_nvdec_cuarray_hwaccel) and the
corresponding AV_PIX_FMT_CUARRAY entries in each decoder's pixel format
negotiation list. This allows decoders to advertise CUARRAY as a
supported hardware output format alongside AV_PIX_FMT_CUDA.

Codecs: H.264, HEVC, AV1, MPEG-1, MPEG-2, MPEG-4, VC-1, WMV3, VP8, VP9.

Signed-off-by: Diego de Souza <ddesouza@nvidia.com>
2026-07-14 19:45:02 +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
Lynne 876d10f683 lavc/apv_encode_vulkan: add a Vulkan APV encoder
This commit adds a compliant Vulkan compute APV encoder.
2026-07-02 16:45:08 +09:00
Lynne d936a51b27 libavcodec/Makefile: add aaccoder_nmr.h to SKIPHEADERS 2026-07-01 21:38:43 +09:00
Andreas Rheinhardt f31675400b avcodec: Remove FF_CODEC_OMX
The omx encoders were deprecated on 2024-11-09.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-23 17:15:02 +02:00
Andreas Rheinhardt ca1d253621 avcodec/sonic: Remove sonic codecs
The original plan from commit d89fbfd4df
(merged on 2024-11-25) was to remove the encoders on the then next
major version bump (i.e. the bump to lavc 62, the current version)
and to disable the decoders by default on said bump. Both did not
happen; one deadline has already passed and the other is right upon us,
so just remove all sonic codecs now.

Note: Codec IDs and descriptors are kept.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-23 17:15:02 +02:00
Romain Beauxis 12dddab095 libavcodec/tests/encinfo.c: add encoder info test utility 2026-06-11 14:06:20 +00:00
James Almer 070bd112be avcodec/h2645_sei: use the ITU-T T35 parsing helpers
Signed-off-by: James Almer <jamrial@gmail.com>
2026-06-02 19:50:39 -03:00
James Almer cf5284b491 avcodec/itut35: add support for HDR Vivid
Needed by h2645_sei.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-06-02 19:50:39 -03:00
James Almer f1929d75a2 avcodec/itut35: add support for AOM film graim
Signed-off-by: James Almer <jamrial@gmail.com>
2026-06-02 19:50:39 -03:00
James Almer 4fcd2349ff avcodec/itut35: add ITU-T T35 parsing helpers
Signed-off-by: James Almer <jamrial@gmail.com>
2026-06-02 19:50:39 -03:00
James Almer 3e402514e5 avcodec/aacencdsp: move init methods outside of the header
Signed-off-by: James Almer <jamrial@gmail.com>
2026-05-28 00:04:06 -03:00
Marvin Scholz 61a0b8fb41 avcodec: remove CELT decoder
libcelt, which it depends on, was not updated in a very long time and is
considered deprecated, as Opus exists which has a CELT mode. Therefore
remove standalone CELT decoding support.

It was already broken since b8604a9761,
11 years ago, and no one noticed and complained.
2026-05-22 09:33:52 +00:00
Ramiro Polla a3d8ba6613 avcodec/webp: add support for Animated WebP decoding
Fixes: 4907

Adds Animated WebP feature according to spec:
https://developers.google.com/speed/webp/docs/riff_container#animation

Original work by Josef Zlomek <josef@pex.com>
and Thilo Borgmann <thilo.borgmann@mail.de>

Signed-off-by: Ramiro Polla <ramiro.polla@gmail.com>
2026-05-19 11:36:10 +02:00
Lynne 5ad8c67e6c apv_decode: add a Vulkan hwaccel 2026-05-19 17:43:53 +09:00
Priyanshu Thapliyal 43e5b26c00 avcodec/pdvenc: add Playdate video encoder
Add a native encoder for the Playdate PDV format.

Supports monob (1-bit) video, producing zlib-compressed intra frames
and XOR-based delta frames.

Includes bounds checking, overflow guards, correct linesize handling
using ptrdiff_t, and proper buffer allocation ordering.

Mark the encoder as experimental by setting AV_CODEC_CAP_EXPERIMENTAL,
since it has not been validated against Panic's official Playdate
player or SDK.
2026-04-09 03:01:43 +00:00
Andreas Rheinhardt 4c179adeaf avcodec/Makefile: Add avformat->h2645_parse.o lcevctab.o dependencies
Fixes static --disable-everything builds.
Forgotten in 053822d9ce
and 49c449b33a.

Reviewed-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-03-28 23:25:31 +01:00
Andreas Rheinhardt 6ed6815b46 avcodec/tests/motion: Remove test tool
It only tests MMX (me_cmp does not have pure MMX functions any more)
and MMXEXT and is therefore x86-only. Furthermore, checkasm is superior
in every regard.

Removing it also fixes a build failure (there is no dependency of this
tool on me_cmp).

Reviewed-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-03-27 18:48:48 +01:00
James Almer 0878ae59f9 avformat/movenc: add support for LCEVC track muxing
Signed-off-by: James Almer <jamrial@gmail.com>
2026-03-14 20:50:21 -03:00
Andreas Rheinhardt 464f440773 avcodec/lcevctab: Properly deduplicate ff_lcevc_resolution_type
(Currently lcevctab.o does not export anything.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-03-13 16:09:40 +00:00
James Almer c5aa31d252 avcodec/lcevc_parser: move the resolution type table to a header
Will be useful in the following commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-03-13 09:18:42 -03:00
James Almer 0cd4bb2f96 avcodec: add an LCEVC parser
Signed-off-by: James Almer <jamrial@gmail.com>
2026-03-07 19:22:40 -03:00
IndecisiveTurtle cebe0b577e lavc: implement a Vulkan-based prores encoder
Adds a vulkan implementation of the reference prores kostya encoder. Provides about 3-4x speedup over the CPU code
2026-03-05 14:02:39 +00:00
IndecisiveTurtle 576de002e5 lavc: Split out common components used by vulkan prores encoder 2026-03-05 14:02:39 +00:00
James Almer 0390793dc3 avcodec/cbs: add support for LCEVC bitstreams
As defined in ISO/IEC 23094-2:2021/FDAM 1:2023

Signed-off-by: James Almer <jamrial@gmail.com>
2026-02-28 16:12:33 -03:00
James Almer 145f6e5878 avcodec/cbs_h2645: split into separate files per module
This file is becoming too bloated and hard to read, so split it into separate
files, each having codec specific methods.
This will also speed up compilation when using several concurrent jobs.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-02-24 10:32:20 -03:00
Lynne eff3dad6b7 avcodec: remove support for runtime SPIR-V compilation
Begone.
2026-02-19 19:42:29 +01:00
Andreas Rheinhardt f02f948ed0 avcodec/wmv2dsp: Modify IDCTDSPContext directly
This allows to remove ff_wmv2_common_init() altogether.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:39:48 +01:00
Tomasz SzumskiandJames Almer 08db850159 avcodec: add JPEG-XS decoder and encoder using libsvtjpegxs
Co-Authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-13 19:00:35 -03:00
James Almer 52c097065c avcodec: add a JPEG-XS parser
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-13 18:45:17 -03:00