-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
patches-master/0029-lavc-videotoolboxenc-add-hevc-main42210-and-p210.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
From 8d16f54186c1c51801157cc6b400750150c1ae67 Mon Sep 17 00:00:00 2001 | ||
From: wang-bin <[email protected]> | ||
Date: Thu, 22 Dec 2022 10:39:29 +0800 | ||
Subject: [PATCH 29/29] lavc/videotoolboxenc: add hevc main42210 and p210 | ||
|
||
supported by apple silicon | ||
--- | ||
libavcodec/videotoolboxenc.c | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
||
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c | ||
index bc505abee4..080cd745bb 100644 | ||
--- a/libavcodec/videotoolboxenc.c | ||
+++ b/libavcodec/videotoolboxenc.c | ||
@@ -115,6 +115,7 @@ static struct{ | ||
|
||
CFStringRef kVTProfileLevel_HEVC_Main_AutoLevel; | ||
CFStringRef kVTProfileLevel_HEVC_Main10_AutoLevel; | ||
+ CFStringRef kVTProfileLevel_HEVC_Main42210_AutoLevel; | ||
|
||
CFStringRef kVTCompressionPropertyKey_RealTime; | ||
CFStringRef kVTCompressionPropertyKey_TargetQualityForAlpha; | ||
@@ -186,6 +187,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_Main10_AutoLevel"); | ||
|
||
GET_SYM(kVTCompressionPropertyKey_RealTime, "RealTime"); | ||
GET_SYM(kVTCompressionPropertyKey_TargetQualityForAlpha, | ||
@@ -966,6 +968,10 @@ static bool get_vt_hevc_profile_level(AVCodecContext *avctx, | ||
*profile_level_val = | ||
compat_keys.kVTProfileLevel_HEVC_Main10_AutoLevel; | ||
break; | ||
+ case HEVC_PROF_MAIN42210: | ||
+ *profile_level_val = | ||
+ compat_keys.kVTProfileLevel_HEVC_Main42210_AutoLevel; | ||
+ break; | ||
} | ||
|
||
if (!*profile_level_val) { | ||
@@ -2816,6 +2822,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 | ||
}; | ||
|
||
@@ -2940,6 +2947,7 @@ 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","Main42210 Profile",0, AV_OPT_TYPE_CONST, { .i64 = AV_PROFILE_HEVC_MAIN_10_422 }, 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 }, | ||
|
||
-- | ||
2.39.3 (Apple Git-146) | ||
|