diff --git a/.github/workflows/build_gpl.yml b/.github/workflows/build_gpl.yml index cb7f292..bc22f7f 100644 --- a/.github/workflows/build_gpl.yml +++ b/.github/workflows/build_gpl.yml @@ -33,7 +33,7 @@ jobs: - config: default target: macCatalyst steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Xcode run: sudo xcode-select -s /Applications/Xcode_15.4.app - name: Create Build Environment @@ -85,7 +85,7 @@ jobs: config: [lite] target: [windows-desktop] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'recursive' - name: Create Build Environment @@ -154,7 +154,7 @@ jobs: config: [lite] target: [windows-desktop] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'recursive' - name: 'Restore sysroot cache' @@ -209,7 +209,7 @@ jobs: matrix: config: [lite] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'recursive' - name: 'Restore sysroot cache' @@ -256,7 +256,7 @@ jobs: matrix: config: [lite] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 'Restore sysroot cache' id: sysroot-cache uses: actions/cache@v4 diff --git a/patches-master/0029-lavc-videotoolboxenc-add-hevc-main42210-and-p210.patch b/patches-master/0029-lavc-videotoolboxenc-add-hevc-main42210-and-p210.patch new file mode 100644 index 0000000..805dab5 --- /dev/null +++ b/patches-master/0029-lavc-videotoolboxenc-add-hevc-main42210-and-p210.patch @@ -0,0 +1,73 @@ +From 83ca42b7a5c23dfc832e282059eb467370abd6ec Mon Sep 17 00:00:00 2001 +From: wang-bin +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/defs.h | 1 + + libavcodec/videotoolboxenc.c | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/libavcodec/defs.h b/libavcodec/defs.h +index 7ddfdcad0b..d7bf5aa00f 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_MAIN_10_422 5 + #define AV_PROFILE_HEVC_SCC 9 + + #define AV_PROFILE_VVC_MAIN_10 1 +diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c +index bc505abee4..1e855c7b57 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 AV_PROFILE_HEVC_MAIN_10_422: ++ *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) +