diff --git a/doc/APIchanges b/doc/APIchanges index 081483b130..f3b0c68575 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28 API changes, most recent first: +2026-03-07 - xxxxxxxxxx - lavc 62.26.100 - codec_desc.h + Add AV_CODEC_PROP_ENHANCEMENT. + 2026-03-07 - xxxxxxxxxx - lavc 62.25.100 - avcodec.h Deprecate AVCodecContext.intra_dc_precision. diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index ad22162b0e..695214f192 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -28,11 +28,13 @@ #include #include "config.h" +#include "libavutil/avassert.h" #include "libavutil/thread.h" #include "avcodec.h" #include "codec.h" #include "codec_id.h" #include "codec_internal.h" +#include "codec_desc.h" extern const FFCodec ff_a64multi_encoder; extern const FFCodec ff_a64multi5_encoder; @@ -1018,6 +1020,7 @@ static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) { const AVCodec *p, *experimental = NULL; + av_unused const AVCodecDescriptor *desc = avcodec_descriptor_get(id); void *i = 0; id = remap_deprecated_codec_id(id); @@ -1026,6 +1029,7 @@ static const AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *)) if (!x(p)) continue; if (p->id == id) { + av_assert1(!desc || !(desc->props & AV_CODEC_PROP_ENHANCEMENT)); if (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL && !experimental) { experimental = p; } else diff --git a/libavcodec/codec_desc.h b/libavcodec/codec_desc.h index 96afd20208..1186433c90 100644 --- a/libavcodec/codec_desc.h +++ b/libavcodec/codec_desc.h @@ -96,6 +96,14 @@ typedef struct AVCodecDescriptor { */ #define AV_CODEC_PROP_FIELDS (1 << 4) +/** + * Video codec contains enhancement information meant to be applied to other + * existing frames, and can't generate usable image data on its own. + * A standalone decoder is unlikely to be available for it and should not + * be expected. + */ +#define AV_CODEC_PROP_ENHANCEMENT (1 << 5) + /** * Subtitle codec is bitmap based * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field. diff --git a/libavcodec/version.h b/libavcodec/version.h index a744e7469f..26ee41eb1f 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 25 +#define LIBAVCODEC_VERSION_MINOR 26 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \