diff --git a/doc/APIchanges b/doc/APIchanges index 9c3eeffff5..06cad83d64 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-xx-xx - xxxxxxx - lavc 61.12.100 - defs.h + Add AV_PROFILE_HEVC_MULTIVIEW_MAIN + 2024-09-xx - xxxxxxxxx - lavu 59.36.100 - opt.h Add av_opt_set_array() and AV_OPT_ARRAY_REPLACE. diff --git a/libavcodec/defs.h b/libavcodec/defs.h index 7ddfdcad0b..24250f8af5 100644 --- a/libavcodec/defs.h +++ b/libavcodec/defs.h @@ -160,6 +160,7 @@ #define AV_PROFILE_HEVC_MAIN_10 2 #define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3 #define AV_PROFILE_HEVC_REXT 4 +#define AV_PROFILE_HEVC_MULTIVIEW_MAIN 6 #define AV_PROFILE_HEVC_SCC 9 #define AV_PROFILE_VVC_MAIN_10 1 diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c index 22042d3e62..ac177c4c65 100644 --- a/libavcodec/hevc/ps.c +++ b/libavcodec/hevc/ps.c @@ -29,6 +29,7 @@ #include "h2645_vui.h" #include "data.h" #include "ps.h" +#include "profiles.h" #include "refstruct.h" static const uint8_t default_scaling_list_intra[] = { @@ -244,6 +245,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, PTLCommon *ptl) { + const char *profile_name = NULL; int i; if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 43 + 1) @@ -252,18 +254,16 @@ static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, ptl->profile_space = get_bits(gb, 2); ptl->tier_flag = get_bits1(gb); ptl->profile_idc = get_bits(gb, 5); - if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN) - av_log(avctx, AV_LOG_DEBUG, "Main profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN_10) - av_log(avctx, AV_LOG_DEBUG, "Main 10 profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN_STILL_PICTURE) - av_log(avctx, AV_LOG_DEBUG, "Main Still Picture profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_REXT) - av_log(avctx, AV_LOG_DEBUG, "Range Extension profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_SCC) - av_log(avctx, AV_LOG_DEBUG, "Screen Content Coding Extension profile bitstream\n"); - else - av_log(avctx, AV_LOG_WARNING, "Unknown HEVC profile: %d\n", ptl->profile_idc); + +#if !CONFIG_SMALL + for (int i = 0; ff_hevc_profiles[i].profile != AV_PROFILE_UNKNOWN; i++) + if (ff_hevc_profiles[i].profile == ptl->profile_idc) { + profile_name = ff_hevc_profiles[i].name; + break; + } +#endif + av_log(avctx, profile_name ? AV_LOG_DEBUG : AV_LOG_WARNING, + "%s profile bitstream\n", profile_name ? profile_name : "Unknown"); for (i = 0; i < 32; i++) { ptl->profile_compatibility_flag[i] = get_bits1(gb); diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c index 44bdf6f85b..3cef82be3b 100644 --- a/libavcodec/profiles.c +++ b/libavcodec/profiles.c @@ -99,6 +99,7 @@ const AVProfile ff_hevc_profiles[] = { { AV_PROFILE_HEVC_MAIN_10, "Main 10" }, { AV_PROFILE_HEVC_MAIN_STILL_PICTURE, "Main Still Picture" }, { AV_PROFILE_HEVC_REXT, "Rext" }, + { AV_PROFILE_HEVC_MULTIVIEW_MAIN, "Multiview Main" }, { AV_PROFILE_HEVC_SCC, "Scc" }, { AV_PROFILE_UNKNOWN }, }; diff --git a/libavcodec/version.h b/libavcodec/version.h index 8b53586be1..da2264a097 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 11 +#define LIBAVCODEC_VERSION_MINOR 12 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \