[FFmpeg-devel] [PATCH v1 1/2] avcodec/videotoolboxenc: add H264 Extended profile and level

Richard Kern kernrj at gmail.com
Tue Aug 27 17:56:42 EEST 2019


I’ll look at it this weekend. 

> On Aug 27, 2019, at 10:40 AM, Limin Wang <lance.lmwang at gmail.com> wrote:
> 
> 
> ping the patchset.
> 
>> On Tue, Aug 20, 2019 at 07:04:29PM +0800, lance.lmwang at gmail.com wrote:
>> From: Limin Wang <lance.lmwang at gmail.com>
>> 
>> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
>> ---
>> libavcodec/videotoolboxenc.c | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>> 
>> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
>> index d76bb7f646..b16b056f6c 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;
>> 
>> @@ -704,6 +709,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) {
>> @@ -2531,6 +2544,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" },
>> -- 
>> 2.21.0
>> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list