diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2019-08-20 14:04:29 +0300 |
---|---|---|
committer | Rick Kern <rick@8birdsvideo.com> | 2019-09-16 16:00:39 +0300 |
commit | 57951f3019061917bbfccbc67360f561ad0bb466 (patch) | |
tree | 2b3a5f556803f016e4353033f6ee722df47c0bbf /libavcodec/videotoolboxenc.c | |
parent | 6966548c1bd8a07548cab72309c4e792166c9603 (diff) |
avcodec/videotoolboxenc: add H264 Extended profile and level
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
Diffstat (limited to 'libavcodec/videotoolboxenc.c')
-rw-r--r-- | libavcodec/videotoolboxenc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 8afdd125d2..6a02d0ef16 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -80,6 +80,8 @@ static struct{ CFStringRef kVTProfileLevel_H264_High_5_1; CFStringRef kVTProfileLevel_H264_High_5_2; CFStringRef kVTProfileLevel_H264_High_AutoLevel; + CFStringRef kVTProfileLevel_H264_Extended_5_0; + CFStringRef kVTProfileLevel_H264_Extended_AutoLevel; CFStringRef kVTProfileLevel_HEVC_Main_AutoLevel; CFStringRef kVTProfileLevel_HEVC_Main10_AutoLevel; @@ -137,6 +139,8 @@ static void loadVTEncSymbols(){ GET_SYM(kVTProfileLevel_H264_High_5_1, "H264_High_5_1"); GET_SYM(kVTProfileLevel_H264_High_5_2, "H264_High_5_2"); GET_SYM(kVTProfileLevel_H264_High_AutoLevel, "H264_High_AutoLevel"); + GET_SYM(kVTProfileLevel_H264_Extended_5_0, "H264_Extended_5_0"); + GET_SYM(kVTProfileLevel_H264_Extended_AutoLevel, "H264_Extended_AutoLevel"); GET_SYM(kVTProfileLevel_HEVC_Main_AutoLevel, "HEVC_Main_AutoLevel"); GET_SYM(kVTProfileLevel_HEVC_Main10_AutoLevel, "HEVC_Main10_AutoLevel"); @@ -154,6 +158,7 @@ typedef enum VT_H264Profile { H264_PROF_BASELINE, H264_PROF_MAIN, H264_PROF_HIGH, + H264_PROF_EXTENDED, H264_PROF_COUNT } VT_H264Profile; @@ -708,6 +713,14 @@ static bool get_vt_h264_profile_level(AVCodecContext *avctx, compat_keys.kVTProfileLevel_H264_High_5_2; break; } break; + case H264_PROF_EXTENDED: + switch (vtctx->level) { + case 0: *profile_level_val = + compat_keys.kVTProfileLevel_H264_Extended_AutoLevel; break; + case 50: *profile_level_val = + compat_keys.kVTProfileLevel_H264_Extended_5_0; break; + } + break; } if (!*profile_level_val) { @@ -2535,6 +2548,7 @@ static const AVOption h264_options[] = { { "baseline", "Baseline Profile", 0, AV_OPT_TYPE_CONST, { .i64 = H264_PROF_BASELINE }, INT_MIN, INT_MAX, VE, "profile" }, { "main", "Main Profile", 0, AV_OPT_TYPE_CONST, { .i64 = H264_PROF_MAIN }, INT_MIN, INT_MAX, VE, "profile" }, { "high", "High Profile", 0, AV_OPT_TYPE_CONST, { .i64 = H264_PROF_HIGH }, INT_MIN, INT_MAX, VE, "profile" }, + { "extended", "Extend Profile", 0, AV_OPT_TYPE_CONST, { .i64 = H264_PROF_EXTENDED }, INT_MIN, INT_MAX, VE, "profile" }, { "level", "Level", OFFSET(level), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 52, VE, "level" }, { "1.3", "Level 1.3, only available with Baseline Profile", 0, AV_OPT_TYPE_CONST, { .i64 = 13 }, INT_MIN, INT_MAX, VE, "level" }, |