mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/videotoolboxenc: remove AUTO_PROFILE define
Use FF_PROFILE_UNKNOWN as auto mode. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
315c66af0f
commit
3fafc842f1
@ -206,7 +206,6 @@ static void loadVTEncSymbols(void){
|
||||
GET_SYM(kVTCompressionPropertyKey_MinAllowedFrameQP, "MinAllowedFrameQP");
|
||||
}
|
||||
|
||||
#define AUTO_PROFILE 0
|
||||
#define H264_PROFILE_CONSTRAINED_HIGH (FF_PROFILE_H264_HIGH | FF_PROFILE_H264_CONSTRAINED)
|
||||
|
||||
typedef enum VTH264Entropy{
|
||||
@ -737,7 +736,7 @@ static bool get_vt_h264_profile_level(AVCodecContext *avctx,
|
||||
VTEncContext *vtctx = avctx->priv_data;
|
||||
int profile = vtctx->profile;
|
||||
|
||||
if (profile == AUTO_PROFILE && vtctx->level) {
|
||||
if (profile == FF_PROFILE_UNKNOWN && vtctx->level) {
|
||||
//Need to pick a profile if level is not auto-selected.
|
||||
profile = vtctx->has_b_frames ? FF_PROFILE_H264_MAIN : FF_PROFILE_H264_BASELINE;
|
||||
}
|
||||
@ -745,7 +744,7 @@ static bool get_vt_h264_profile_level(AVCodecContext *avctx,
|
||||
*profile_level_val = NULL;
|
||||
|
||||
switch (profile) {
|
||||
case AUTO_PROFILE:
|
||||
case FF_PROFILE_UNKNOWN:
|
||||
return true;
|
||||
|
||||
case FF_PROFILE_H264_BASELINE:
|
||||
@ -869,7 +868,7 @@ static bool get_vt_hevc_profile_level(AVCodecContext *avctx,
|
||||
*profile_level_val = NULL;
|
||||
|
||||
switch (profile) {
|
||||
case AUTO_PROFILE:
|
||||
case FF_PROFILE_UNKNOWN:
|
||||
return true;
|
||||
case FF_PROFILE_HEVC_MAIN:
|
||||
*profile_level_val =
|
||||
@ -2891,7 +2890,7 @@ static const enum AVPixelFormat prores_pix_fmts[] = {
|
||||
|
||||
#define OFFSET(x) offsetof(VTEncContext, x)
|
||||
static const AVOption h264_options[] = {
|
||||
{ "profile", "Profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = AUTO_PROFILE }, 0, INT_MAX, VE, "profile" },
|
||||
{ "profile", "Profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = FF_PROFILE_UNKNOWN }, FF_PROFILE_UNKNOWN, INT_MAX, VE, "profile" },
|
||||
{ "baseline", "Baseline Profile", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_H264_BASELINE }, INT_MIN, INT_MAX, VE, "profile" },
|
||||
{ "constrained_baseline", "Constrained Baseline Profile", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_H264_CONSTRAINED_BASELINE }, INT_MIN, INT_MAX, VE, "profile" },
|
||||
{ "main", "Main Profile", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_H264_MAIN }, INT_MIN, INT_MAX, VE, "profile" },
|
||||
@ -2948,7 +2947,7 @@ const FFCodec ff_h264_videotoolbox_encoder = {
|
||||
};
|
||||
|
||||
static const AVOption hevc_options[] = {
|
||||
{ "profile", "Profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = AUTO_PROFILE }, 0, INT_MAX, VE, "profile" },
|
||||
{ "profile", "Profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = FF_PROFILE_UNKNOWN }, FF_PROFILE_UNKNOWN, INT_MAX, VE, "profile" },
|
||||
{ "main", "Main Profile", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_HEVC_MAIN }, INT_MIN, INT_MAX, VE, "profile" },
|
||||
{ "main10", "Main10 Profile", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, VE, "profile" },
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user