Commit 5f21d2b9e7 for ffmpeg
commit 5f21d2b9e78718b1dc07921ea1be157bb75666ba
Author: Rainbaby <r@bgr.jp>
Date: Fri Aug 28 16:18:08 2026 +0900
avcodec/cavs: name and report the two AVS profiles
AVS1-P16 support needs a name for profile_id 0x48, so add both
constants and the profile table.
Signed-off-by: Rainbaby <r@bgr.jp>
diff --git a/doc/APIchanges b/doc/APIchanges
index a0373238a7..36f95c8df2 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2026-06-23.
API changes, most recent first:
+2026-11-xx - xxxxxxxxxx - lavc 63.26.100 - defs.h
+ Add AV_PROFILE_CAVS_JIZHUN and AV_PROFILE_CAVS_BROADCASTING.
+
2026-10-xx - xxxxxxxxxx - lavfi 12.12.100 - avfilter.h
Deprecate AVFilterGraph.max_buffered_frames in favor of
avfilter_graph_set_max_buffered_frames().
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 2e503a77aa..490aa3319a 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -35,6 +35,7 @@
#include "golomb.h"
#include "cavs.h"
#include "codec_internal.h"
+#include "profiles.h"
#include "decode.h"
#include "mathops.h"
#include "mpeg12data.h"
@@ -1254,9 +1255,8 @@ static int decode_seq_header(AVSContext *h)
int ret;
profile = get_bits(&h->gb, 8);
- if (profile != 0x20) {
- avpriv_report_missing_feature(h->avctx,
- "only support JiZhun profile");
+ if (profile != AV_PROFILE_CAVS_JIZHUN) {
+ avpriv_report_missing_feature(h->avctx, "Profile %#x", profile);
return AVERROR_PATCHWELCOME;
}
level = get_bits(&h->gb, 8);
@@ -1314,6 +1314,7 @@ static int decode_seq_header(AVSContext *h)
h->mb_width = mb_width;
h->mb_height = mb_height;
h->low_delay = low_delay;
+ h->avctx->profile = profile;
h->avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_code];
if (!h->top_qp)
return ff_cavs_init_top_lines(h);
@@ -1422,5 +1423,6 @@ const FFCodec ff_cavs_decoder = {
FF_CODEC_DECODE_CB(cavs_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.flush = cavs_flush,
+ .p.profiles = NULL_IF_CONFIG_SMALL(ff_cavs_profiles),
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index cc0a88e5dd..e117b81f0c 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -660,6 +660,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
.name = "cavs",
.long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"),
.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER,
+ .profiles = NULL_IF_CONFIG_SMALL(ff_cavs_profiles),
},
{
.id = AV_CODEC_ID_JPEG2000,
diff --git a/libavcodec/defs.h b/libavcodec/defs.h
index cd5944bf09..64ad227ccc 100644
--- a/libavcodec/defs.h
+++ b/libavcodec/defs.h
@@ -219,6 +219,8 @@
#define AV_PROFILE_APV_4444_12 88
#define AV_PROFILE_APV_400_10 99
+#define AV_PROFILE_CAVS_JIZHUN 0x20
+#define AV_PROFILE_CAVS_BROADCASTING 0x48
#define AV_LEVEL_UNKNOWN -99
diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
index d41ba14b96..f482194795 100644
--- a/libavcodec/profiles.c
+++ b/libavcodec/profiles.c
@@ -67,6 +67,12 @@ const AVProfile ff_mpegh_3da_profiles[] = {
{ AV_PROFILE_UNKNOWN },
};
+const AVProfile ff_cavs_profiles[] = {
+ { AV_PROFILE_CAVS_JIZHUN, "JiZhun" },
+ { AV_PROFILE_CAVS_BROADCASTING, "Broadcasting" },
+ { AV_PROFILE_UNKNOWN },
+};
+
const AVProfile ff_dnxhd_profiles[] = {
{ AV_PROFILE_DNXHD, "DNXHD"},
{ AV_PROFILE_DNXHR_LB, "DNXHR LB"},
diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
index 3d4f043f0b..6019081d8b 100644
--- a/libavcodec/profiles.h
+++ b/libavcodec/profiles.h
@@ -63,6 +63,7 @@ extern const AVProfile ff_dca_profiles[];
extern const AVProfile ff_eac3_profiles[];
extern const AVProfile ff_truehd_profiles[];
extern const AVProfile ff_mpegh_3da_profiles[];
+extern const AVProfile ff_cavs_profiles[];
extern const AVProfile ff_dnxhd_profiles[];
extern const AVProfile ff_h264_profiles[];
extern const AVProfile ff_hevc_profiles[];
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3ade8a8314..26ee41eb1f 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,8 +29,8 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 25
-#define LIBAVCODEC_VERSION_MICRO 102
+#define LIBAVCODEC_VERSION_MINOR 26
+#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \