[FFmpeg-cvslog] lavc/videotoolboxenc: add hevc main42210 and p210
wang-bin
git at videolan.org
Thu Mar 13 12:40:28 EET 2025
ffmpeg | branch: master | wang-bin <wbsecg1 at gmail.com> | Thu Dec 22 10:39:29 2022 +0800| [154c00514d889d27ae84a1001e00f9032fdc1c54] | committer: Zhao Zhili
lavc/videotoolboxenc: add hevc main42210 and p210
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=154c00514d889d27ae84a1001e00f9032fdc1c54
---
libavcodec/videotoolboxenc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 55a440c7b4..ff8f01b2ce 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -120,6 +120,7 @@ static struct{
CFStringRef kVTProfileLevel_HEVC_Main_AutoLevel;
CFStringRef kVTProfileLevel_HEVC_Main10_AutoLevel;
+ CFStringRef kVTProfileLevel_HEVC_Main42210_AutoLevel;
CFStringRef kVTCompressionPropertyKey_RealTime;
CFStringRef kVTCompressionPropertyKey_TargetQualityForAlpha;
@@ -192,6 +193,7 @@ static void loadVTEncSymbols(void){
GET_SYM(kVTProfileLevel_HEVC_Main_AutoLevel, "HEVC_Main_AutoLevel");
GET_SYM(kVTProfileLevel_HEVC_Main10_AutoLevel, "HEVC_Main10_AutoLevel");
+ GET_SYM(kVTProfileLevel_HEVC_Main42210_AutoLevel, "HEVC_Main42210_AutoLevel");
GET_SYM(kVTCompressionPropertyKey_RealTime, "RealTime");
GET_SYM(kVTCompressionPropertyKey_TargetQualityForAlpha,
@@ -979,6 +981,11 @@ static bool get_vt_hevc_profile_level(AVCodecContext *avctx,
*profile_level_val =
compat_keys.kVTProfileLevel_HEVC_Main10_AutoLevel;
break;
+ case AV_PROFILE_HEVC_REXT:
+ // only main42210 is supported, omit depth and chroma subsampling
+ *profile_level_val =
+ compat_keys.kVTProfileLevel_HEVC_Main42210_AutoLevel;
+ break;
}
if (!*profile_level_val) {
@@ -2854,6 +2861,7 @@ static const enum AVPixelFormat hevc_pix_fmts[] = {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_BGRA,
AV_PIX_FMT_P010LE,
+ AV_PIX_FMT_P210,
AV_PIX_FMT_NONE
};
@@ -2988,6 +2996,8 @@ static const AVOption hevc_options[] = {
{ "profile", "Profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = AV_PROFILE_UNKNOWN }, AV_PROFILE_UNKNOWN, INT_MAX, VE, .unit = "profile" },
{ "main", "Main Profile", 0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_MAIN }, INT_MIN, INT_MAX, VE, .unit = "profile" },
{ "main10", "Main10 Profile", 0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, VE, .unit = "profile" },
+ { "main42210","Main 4:2:2 10 Profile",0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_REXT }, INT_MIN, INT_MAX, VE, .unit = "profile" },
+ { "rext", "Main 4:2:2 10 Profile",0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_REXT }, INT_MIN, INT_MAX, VE, .unit = "profile" },
{ "alpha_quality", "Compression quality for the alpha channel", OFFSET(alpha_quality), AV_OPT_TYPE_DOUBLE, { .dbl = 0.0 }, 0.0, 1.0, VE },
More information about the ffmpeg-cvslog
mailing list