{"rc","Set the rate control mode",OFFSET(rate_control_mode),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_UNKNOWN},AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_UNKNOWN,AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_CBR,VE,"rc"},
{"rc","Set the rate control mode",OFFSET(rate_control_mode),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_UNKNOWN},AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_UNKNOWN,AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR,VE,"rc"},
{"pa_scene_change_detection_enable","Enable scene change detection",OFFSET(pa_scene_change_detection),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_scene_change_detection_sensitivity","Set the sensitivity of scene change detection",OFFSET(pa_scene_change_detection_sensitivity),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH,VE,"scene_change_sensitivity"},
{"low","low scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_LOW},0,0,VE,"scene_change_sensitivity"},
{"medium","medium scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_MEDIUM},0,0,VE,"scene_change_sensitivity"},
{"high","high scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH},0,0,VE,"scene_change_sensitivity"},
{"pa_static_scene_detection_enable","Enable static scene detection",OFFSET(pa_static_scene_detection),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_static_scene_detection_sensitivity","Set the sensitivity of static scene detection",OFFSET(pa_static_scene_detection_sensitivity),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH,VE,"static_scene_sensitivity"},
{"low","low static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_LOW},0,0,VE,"static_scene_sensitivity"},
{"medium","medium static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_MEDIUM},0,0,VE,"static_scene_sensitivity"},
{"high","high static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH},0,0,VE,"static_scene_sensitivity"},
{"pa_initial_qp_after_scene_change","The QP value that is used immediately after a scene change",OFFSET(pa_initial_qp),AV_OPT_TYPE_INT,{.i64=-1},-1,51,VE},
{"pa_max_qp_before_force_skip","The QP threshold to allow a skip frame",OFFSET(pa_max_qp),AV_OPT_TYPE_INT,{.i64=-1},-1,51,VE},
{"pa_frame_sad_enable","Enable Frame SAD algorithm",OFFSET(pa_frame_sad),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_ltr_enable","Enable long term reference frame management",OFFSET(pa_ltr),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_lookahead_buffer_depth","Sets the PA lookahead buffer size",OFFSET(pa_lookahead_buffer_depth),AV_OPT_TYPE_INT,{.i64=-1},-1,MAX_LOOKAHEAD_DEPTH,VE},
{"pa_paq_mode","Sets the perceptual adaptive quantization mode",OFFSET(pa_paq_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_PAQ_MODE_CAQ,VE,"paq_mode"},
{"pa_high_motion_quality_boost_mode","Sets the PA high motion quality boost mode",OFFSET(pa_high_motion_quality_boost_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_AUTO,VE,"high_motion_quality_boost_mode"},
{"none","no high motion quality boost",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_NONE},0,0,VE,"high_motion_quality_boost_mode"},
{"auto","auto high motion quality boost",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_AUTO},0,0,VE,"high_motion_quality_boost_mode"},
{"rc","Rate Control Method",OFFSET(rate_control_mode),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN},AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN,AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR,VE,"rc"},
{"rc","Rate Control Method",OFFSET(rate_control_mode),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN},AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN,AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR,VE,"rc"},
{"pa_scene_change_detection_enable","Enable scene change detection",OFFSET(pa_scene_change_detection),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_scene_change_detection_sensitivity","Set the sensitivity of scene change detection",OFFSET(pa_scene_change_detection_sensitivity),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH,VE,"scene_change_sensitivity"},
{"low","low scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_LOW},0,0,VE,"scene_change_sensitivity"},
{"medium","medium scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_MEDIUM},0,0,VE,"scene_change_sensitivity"},
{"high","high scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH},0,0,VE,"scene_change_sensitivity"},
{"pa_static_scene_detection_enable","Enable static scene detection",OFFSET(pa_static_scene_detection),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_static_scene_detection_sensitivity","Set the sensitivity of static scene detection",OFFSET(pa_static_scene_detection_sensitivity),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH,VE,"static_scene_sensitivity"},
{"low","low static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_LOW},0,0,VE,"static_scene_sensitivity"},
{"medium","medium static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_MEDIUM},0,0,VE,"static_scene_sensitivity"},
{"high","high static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH},0,0,VE,"static_scene_sensitivity"},
{"pa_initial_qp_after_scene_change","The QP value that is used immediately after a scene change",OFFSET(pa_initial_qp),AV_OPT_TYPE_INT,{.i64=-1},-1,51,VE},
{"pa_max_qp_before_force_skip","The QP threshold to allow a skip frame",OFFSET(pa_max_qp),AV_OPT_TYPE_INT,{.i64=-1},-1,51,VE},
{"pa_frame_sad_enable","Enable Frame SAD algorithm",OFFSET(pa_frame_sad),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_ltr_enable","Enable long term reference frame management",OFFSET(pa_ltr),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_lookahead_buffer_depth","Sets the PA lookahead buffer size",OFFSET(pa_lookahead_buffer_depth),AV_OPT_TYPE_INT,{.i64=-1},-1,MAX_LOOKAHEAD_DEPTH,VE},
{"pa_paq_mode","Sets the perceptual adaptive quantization mode",OFFSET(pa_paq_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_PAQ_MODE_CAQ,VE,"paq_mode"},
{"pa_high_motion_quality_boost_mode","Sets the PA high motion quality boost mode",OFFSET(pa_high_motion_quality_boost_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_AUTO,VE,"high_motion_quality_boost_mode"},
{"none","no high motion quality boost",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_NONE},0,0,VE,"high_motion_quality_boost_mode"},
{"auto","auto high motion quality boost",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_AUTO},0,0,VE,"high_motion_quality_boost_mode"},
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
staticconstAVOptionoptions[]={
{"usage","Set the encoding usage",OFFSET(usage),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCONDING},AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCONDING,AMF_VIDEO_ENCODER_HEVC_USAGE_WEBCAM,VE,"usage"},
{"usage","Set the encoding usage",OFFSET(usage),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING},AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING,AMF_VIDEO_ENCODER_HEVC_USAGE_LOW_LATENCY_HIGH_QUALITY,VE,"usage"},
{"lowlatency_high_quality","low latency yet high quality trancoding",0,AV_OPT_TYPE_CONST,{.i64=AMF_VIDEO_ENCODER_HEVC_USAGE_LOW_LATENCY_HIGH_QUALITY},0,0,VE,"usage"},
{"profile","Set the profile (default main)",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN},AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN,AMF_VIDEO_ENCODER_HEVC_PROFILE_MAIN,VE,"profile"},
{"rc","Set the rate control mode",OFFSET(rate_control_mode),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_UNKNOWN},AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_UNKNOWN,AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR,VE,"rc"},
{"rc","Set the rate control mode",OFFSET(rate_control_mode),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_UNKNOWN},AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_UNKNOWN,AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR,VE,"rc"},
{"pa_scene_change_detection_enable","Enable scene change detection",OFFSET(pa_scene_change_detection),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_scene_change_detection_sensitivity","Set the sensitivity of scene change detection",OFFSET(pa_scene_change_detection_sensitivity),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH,VE,"scene_change_sensitivity"},
{"low","low scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_LOW},0,0,VE,"scene_change_sensitivity"},
{"medium","medium scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_MEDIUM},0,0,VE,"scene_change_sensitivity"},
{"high","high scene change dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH},0,0,VE,"scene_change_sensitivity"},
{"pa_static_scene_detection_enable","Enable static scene detection",OFFSET(pa_static_scene_detection),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_static_scene_detection_sensitivity","Set the sensitivity of static scene detection",OFFSET(pa_static_scene_detection_sensitivity),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH,VE,"static_scene_sensitivity"},
{"low","low static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_LOW},0,0,VE,"static_scene_sensitivity"},
{"medium","medium static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_MEDIUM},0,0,VE,"static_scene_sensitivity"},
{"high","high static scene dectection sensitivity",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH},0,0,VE,"static_scene_sensitivity"},
{"pa_initial_qp_after_scene_change","The QP value that is used immediately after a scene change",OFFSET(pa_initial_qp),AV_OPT_TYPE_INT,{.i64=-1},-1,51,VE},
{"pa_max_qp_before_force_skip","The QP threshold to allow a skip frame",OFFSET(pa_max_qp),AV_OPT_TYPE_INT,{.i64=-1},-1,51,VE},
{"pa_frame_sad_enable","Enable Frame SAD algorithm",OFFSET(pa_frame_sad),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_ltr_enable","Enable long term reference frame management",OFFSET(pa_ltr),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
{"pa_lookahead_buffer_depth","Sets the PA lookahead buffer size",OFFSET(pa_lookahead_buffer_depth),AV_OPT_TYPE_INT,{.i64=-1},-1,MAX_LOOKAHEAD_DEPTH,VE},
{"pa_paq_mode","Sets the perceptual adaptive quantization mode",OFFSET(pa_paq_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_PAQ_MODE_CAQ,VE,"paq_mode"},
{"pa_high_motion_quality_boost_mode","Sets the PA high motion quality boost mode",OFFSET(pa_high_motion_quality_boost_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_AUTO,VE,"high_motion_quality_boost_mode"},
{"none","no high motion quality boost",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_NONE},0,0,VE,"high_motion_quality_boost_mode"},
{"auto","auto high motion quality boost",0,AV_OPT_TYPE_CONST,{.i64=AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_AUTO},0,0,VE,"high_motion_quality_boost_mode"},