Makes it robust against adding fields before it, which will be useful in
following commits.
Majority of the patch generated by the following Coccinelle script:
@@
typedef AVOption;
identifier arr_name;
initializer list il;
initializer list[8] il1;
expression tail;
@@
AVOption arr_name[] = { il, { il1,
- tail
+ .unit = tail
}, ... };
with some manual changes, as the script:
* has trouble with options defined inside macros
* sometimes does not handle options under an #else branch
* sometimes swallows whitespace
{"dsurex_mode","Dolby Surround EX Mode",OFFSET(dolby_surround_ex_mode),AV_OPT_TYPE_INT,{.i64=AC3ENC_OPT_NONE},AC3ENC_OPT_NONE,AC3ENC_OPT_DSUREX_DPLIIZ,AC3ENC_PARAM,"dsurex_mode"},
{"dsurex_mode","Dolby Surround EX Mode",OFFSET(dolby_surround_ex_mode),AV_OPT_TYPE_INT,{.i64=AC3ENC_OPT_NONE},AC3ENC_OPT_NONE,AC3ENC_OPT_DSUREX_DPLIIZ,AC3ENC_PARAM,.unit="dsurex_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_AV1_USAGE_TRANSCODING},AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING,AMF_VIDEO_ENCODER_AV1_USAGE_LOW_LATENCY,VE,"usage"},
{"profile","Set the profile (default main)",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN},AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN,AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN,VE,"profile"},
{"quality","Set the encoding quality",OFFSET(quality),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED},AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_HIGH_QUALITY,AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED,VE,"quality"},
{"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"},
{"usage","Set the encoding usage",OFFSET(usage),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING},AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING,AMF_VIDEO_ENCODER_AV1_USAGE_LOW_LATENCY,VE,.unit="usage"},
{"profile","Set the profile (default main)",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN},AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN,AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN,VE,.unit="profile"},
{"quality","Set the encoding quality",OFFSET(quality),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED},AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_HIGH_QUALITY,AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED,VE,.unit="quality"},
{"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,.unit="rc"},
{"pa_activity_type","Set the type of activity analysis",OFFSET(pa_activity_type),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_ACTIVITY_YUV,VE,.unit="activity_type"},
{"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_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,.unit="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,.unit="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,.unit="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,.unit="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_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,.unit="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,.unit="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,.unit="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,.unit="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"},
{"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,.unit="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,.unit="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,.unit="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_HIGH_QUALITY_CBR,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,.unit="rc"},
{"pa_activity_type","Set the type of activity analysis",OFFSET(pa_activity_type),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_ACTIVITY_YUV,VE,.unit="activity_type"},
{"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_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,.unit="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,.unit="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,.unit="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,.unit="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_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,.unit="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,.unit="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,.unit="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,.unit="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"},
{"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,.unit="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,.unit="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,.unit="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_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"},
{"quality","Set the encoding quality",OFFSET(quality),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED},AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY,AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED,VE,"quality"},
{"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"},
{"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,.unit="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,.unit="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,.unit="profile"},
{"quality","Set the encoding quality",OFFSET(quality),AV_OPT_TYPE_INT,{.i64=AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED},AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY,AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED,VE,.unit="quality"},
{"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,.unit="rc"},
{"pa_activity_type","Set the type of activity analysis",OFFSET(pa_activity_type),AV_OPT_TYPE_INT,{.i64=-1},-1,AMF_PA_ACTIVITY_YUV,VE,.unit="activity_type"},
{"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_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,.unit="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,.unit="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,.unit="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,.unit="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_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,.unit="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,.unit="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,.unit="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,.unit="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"},
{"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,.unit="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,.unit="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,.unit="high_motion_quality_boost_mode"},
@ -925,10 +925,10 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub,
staticconstAVOptionoptions[]={
{"real_time","emit subtitle events as they are decoded for real-time display",OFFSET(real_time),AV_OPT_TYPE_BOOL,{.i64=0},0,1,SD},
{"real_time_latency_msec","minimum elapsed time between emitting real-time subtitle events",OFFSET(real_time_latency_msec),AV_OPT_TYPE_INT,{.i64=200},0,500,SD},
{"data_field","select data field",OFFSET(data_field),AV_OPT_TYPE_INT,{.i64=-1},-1,1,SD,"data_field"},
{"auto","pick first one that appears",0,AV_OPT_TYPE_CONST,{.i64=-1},0,0,SD,"data_field"},
{"lpc_passes","Number of passes to use for Cholesky factorization during LPC analysis",offsetof(FlacEncodeContext,options.lpc_passes),AV_OPT_TYPE_INT,{.i64=2},1,INT_MAX,FLAGS},
{"default","Improve resiliency against losses of whole frames",0,AV_OPT_TYPE_CONST,{.i64=AOM_ERROR_RESILIENT_DEFAULT},0,0,VE,.unit="er"},
{"crf","Select the quality for constant quality mode",offsetof(AOMContext,crf),AV_OPT_TYPE_INT,{.i64=-1},-1,63,VE},
{"static-thresh","A change threshold on blocks below which they will be skipped by the encoder",OFFSET(static_thresh),AV_OPT_TYPE_INT,{.i64=0},0,INT_MAX,VE},
{"drop-threshold","Frame drop threshold",offsetof(AOMContext,drop_threshold),AV_OPT_TYPE_INT,{.i64=0},INT_MIN,INT_MAX,VE},
{"allintra","All Intra encoding",0,AV_OPT_TYPE_CONST,{.i64=2/* AOM_USAGE_ALL_INTRA */},0,0,VE,"usage"},
{"tune","The metric that the encoder tunes for. Automatically chosen by the encoder by default",OFFSET(tune),AV_OPT_TYPE_INT,{.i64=-1},-1,AOM_TUNE_SSIM,VE,"tune"},
{"allintra","All Intra encoding",0,AV_OPT_TYPE_CONST,{.i64=2/* AOM_USAGE_ALL_INTRA */},0,0,VE,.unit="usage"},
{"tune","The metric that the encoder tunes for. Automatically chosen by the encoder by default",OFFSET(tune),AV_OPT_TYPE_INT,{.i64=-1},-1,AOM_TUNE_SSIM,VE,.unit="tune"},
{"drc_level","Dynamic Range Control: reference level, quantized to 0.25dB steps where [0] is 0dB and [127] is -31.75dB, -1 for auto, and -2 for disabled",
{"default","Choose signaling implicitly (explicit hierarchical by default, implicit if global header is disabled)",0,AV_OPT_TYPE_CONST,{.i64=-1},0,0,AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_ENCODING_PARAM,"signaling"},
{"default","Choose signaling implicitly (explicit hierarchical by default, implicit if global header is disabled)",0,AV_OPT_TYPE_CONST,{.i64=-1},0,0,AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_ENCODING_PARAM,.unit="signaling"},
{"header_period","StreamMuxConfig and PCE repetition period (in frames)",offsetof(AACContext,header_period),AV_OPT_TYPE_INT,{.i64=0},0,0xffff,AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_ENCODING_PARAM},
{"buffer","using buffer status to adjust the video quality (no bitrate control)",0,AV_OPT_TYPE_CONST,{.i64=RC_BUFFERBASED_MODE},0,0,VE,.unit="rc_mode"},
#if OPENH264_VER_AT_LEAST(1, 4)
{"timestamp","bit rate control based on timestamp",0,AV_OPT_TYPE_CONST,{.i64=RC_TIMESTAMP_MODE},0,0,VE,"rc_mode"},
{"timestamp","bit rate control based on timestamp",0,AV_OPT_TYPE_CONST,{.i64=RC_TIMESTAMP_MODE},0,0,VE,.unit="rc_mode"},
{"audio","Favor faithfulness to the input",0,AV_OPT_TYPE_CONST,{.i64=OPUS_APPLICATION_AUDIO},0,0,FLAGS,"application"},
{"lowdelay","Restrict to only the lowest delay modes, disable voice-optimized modes",0,AV_OPT_TYPE_CONST,{.i64=OPUS_APPLICATION_RESTRICTED_LOWDELAY},0,0,FLAGS,"application"},
{"audio","Favor faithfulness to the input",0,AV_OPT_TYPE_CONST,{.i64=OPUS_APPLICATION_AUDIO},0,0,FLAGS,.unit="application"},
{"lowdelay","Restrict to only the lowest delay modes, disable voice-optimized modes",0,AV_OPT_TYPE_CONST,{.i64=OPUS_APPLICATION_RESTRICTED_LOWDELAY},0,0,FLAGS,.unit="application"},
{"frame_duration","Duration of a frame in milliseconds",OFFSET(frame_duration),AV_OPT_TYPE_FLOAT,{.dbl=20.0},2.5,120.0,FLAGS},
{"packet_loss","Expected packet loss percentage",OFFSET(packet_loss),AV_OPT_TYPE_INT,{.i64=0},0,100,FLAGS},
{"fec","Enable inband FEC. Expected packet loss must be non-zero",OFFSET(fec),AV_OPT_TYPE_BOOL,{.i64=0},0,1,FLAGS},
{"vbr","Variable bit rate mode",OFFSET(vbr),AV_OPT_TYPE_INT,{.i64=1},0,2,FLAGS,"vbr"},
{"off","Use constant bit rate",0,AV_OPT_TYPE_CONST,{.i64=0},0,0,FLAGS,"vbr"},
{"on","Use variable bit rate",0,AV_OPT_TYPE_CONST,{.i64=1},0,0,FLAGS,"vbr"},
{"deadline","Time to spend encoding, in microseconds.",OFFSET(deadline),AV_OPT_TYPE_INT,{.i64=VPX_DL_GOOD_QUALITY},INT_MIN,INT_MAX,VE,.unit="quality"}, \
{"default","Improve resiliency against losses of whole frames",0,AV_OPT_TYPE_CONST,{.i64=VPX_ERROR_RESILIENT_DEFAULT},0,0,VE,"er"}, \
{"default","Improve resiliency against losses of whole frames",0,AV_OPT_TYPE_CONST,{.i64=VPX_ERROR_RESILIENT_DEFAULT},0,0,VE,.unit="er"}, \
{"partitions","The frame partitions are independently decodable " \
"by the bool decoder, meaning that partitions can be decoded even " \
"though earlier partitions have been lost. Note that intra prediction" \
" is still done over the partition boundary.",0,AV_OPT_TYPE_CONST,{.i64=VPX_ERROR_RESILIENT_PARTITIONS},0,0,VE,"er"}, \
" is still done over the partition boundary.",0,AV_OPT_TYPE_CONST,{.i64=VPX_ERROR_RESILIENT_PARTITIONS},0,0,VE,.unit="er"}, \
{"crf","Select the quality for constant quality mode",offsetof(VPxContext,crf),AV_OPT_TYPE_INT,{.i64=-1},-1,63,VE}, \
{"static-thresh","A change threshold on blocks below which they will be skipped by the encoder",OFFSET(static_thresh),AV_OPT_TYPE_INT,{.i64=0},0,INT_MAX,VE}, \
{"drop-threshold","Frame drop threshold",offsetof(VPxContext,drop_threshold),AV_OPT_TYPE_INT,{.i64=0},INT_MIN,INT_MAX,VE}, \
{"altref","enable use of alternate reference frames (VP8/2-pass only)",0,AV_OPT_TYPE_CONST,{.i64=VP8F_AUTO_ALT_REF},INT_MIN,INT_MAX,VE,.unit="flags"}, \
{"arnr_max_frames","altref noise reduction max frame count",offsetof(VPxContext,arnr_max_frames),AV_OPT_TYPE_INT,{.i64=0},0,15,VE}, \
{"autovariance-biased","Auto-variance AQ with bias to dark scenes",0,AV_OPT_TYPE_CONST,{.i64=X264_AQ_AUTOVARIANCE_BIASED},INT_MIN,INT_MAX,VE,"aq_mode"},
{"autovariance-biased","Auto-variance AQ with bias to dark scenes",0,AV_OPT_TYPE_CONST,{.i64=X264_AQ_AUTOVARIANCE_BIASED},INT_MIN,INT_MAX,VE,.unit="aq_mode"},
#endif
{"aq-strength","AQ strength. Reduces blocking and blurring in flat and textured areas.",OFFSET(aq_strength),AV_OPT_TYPE_FLOAT,{.dbl=-1},-1,FLT_MAX,VE},
{"tune","Tuning parameter for special purpose operation",OFFSET(tune_id),AV_OPT_TYPE_INT,{.i64=XEVE_TUNE_NONE},XEVE_TUNE_NONE,XEVE_TUNE_PSNR,VE,"tune"},
{"tune","Tuning parameter for special purpose operation",OFFSET(tune_id),AV_OPT_TYPE_INT,{.i64=XEVE_TUNE_NONE},XEVE_TUNE_NONE,XEVE_TUNE_PSNR,VE,.unit="tune"},
{"display_remoting_with_feature_map","Display remoting with feature map",0,AV_OPT_TYPE_CONST,{.i64=ff_eAVScenarioInfo_DisplayRemotingWithFeatureMap},0,0,VE,"scenario"},
{"display_remoting_with_feature_map","Display remoting with feature map",0,AV_OPT_TYPE_CONST,{.i64=ff_eAVScenarioInfo_DisplayRemotingWithFeatureMap},0,0,VE,.unit="scenario"},
{"force_duplicated_matrix","Always write luma and chroma matrix for mjpeg, useful for rtp streaming.",OFFSET(force_duplicated_matrix),AV_OPT_TYPE_BOOL,{.i64=0},0,1,VE},
@ -2275,14 +2275,14 @@ static av_cold int mlp_encode_close(AVCodecContext *avctx)
staticconstAVOptionmlp_options[]={
{"max_interval","Max number of frames between each new header",OFFSET(max_restart_interval),AV_OPT_TYPE_INT,{.i64=16},MIN_HEADER_INTERVAL,MAX_HEADER_INTERVAL,FLAGS},
{"video_format","Video_format in the sequence_display_extension indicating the source of the video.",OFFSET(video_format),AV_OPT_TYPE_INT,{.i64=VIDEO_FORMAT_UNSPECIFIED},0,7,VE,"video_format"},
{"video_format","Video_format in the sequence_display_extension indicating the source of the video.",OFFSET(video_format),AV_OPT_TYPE_INT,{.i64=VIDEO_FORMAT_UNSPECIFIED},0,7,VE,.unit="video_format"},
{"msad","Sum of absolute differences, median predicted",0,AV_OPT_TYPE_CONST,{.i64=FF_CMP_MEDIAN_SAD},INT_MIN,INT_MAX,FF_MPV_OPT_FLAGS,.unit="cmp_func"}
{"mpv_flags","Flags common for all mpegvideo-based encoders.",FF_MPV_OFFSET(mpv_flags),AV_OPT_TYPE_FLAGS,{.i64=0},INT_MIN,INT_MAX,FF_MPV_OPT_FLAGS,"mpv_flags"},\
{"mv0","always try a mb with mv=<0,0>",0,AV_OPT_TYPE_CONST,{.i64=FF_MPV_FLAG_MV0},0,0,FF_MPV_OPT_FLAGS,"mpv_flags"},\
{"mpv_flags","Flags common for all mpegvideo-based encoders.",FF_MPV_OFFSET(mpv_flags),AV_OPT_TYPE_FLAGS,{.i64=0},INT_MIN,INT_MAX,FF_MPV_OPT_FLAGS,.unit="mpv_flags"},\
{"tune","Set the encoding tuning info",OFFSET(tuning_info),AV_OPT_TYPE_INT,{.i64=NV_ENC_TUNING_INFO_HIGH_QUALITY},NV_ENC_TUNING_INFO_HIGH_QUALITY,NV_ENC_TUNING_INFO_LOSSLESS,VE,"tune"},
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AV1_AUTOSELECT},NV_ENC_LEVEL_AV1_2,NV_ENC_LEVEL_AV1_AUTOSELECT,VE,"level"},
{"multipass","Set the multipass encoding",OFFSET(multipass),AV_OPT_TYPE_INT,{.i64=NV_ENC_MULTI_PASS_DISABLED},NV_ENC_MULTI_PASS_DISABLED,NV_ENC_TWO_PASS_FULL_RESOLUTION,VE,"multipass"},
{"tune","Set the encoding tuning info",OFFSET(tuning_info),AV_OPT_TYPE_INT,{.i64=NV_ENC_TUNING_INFO_HIGH_QUALITY},NV_ENC_TUNING_INFO_HIGH_QUALITY,NV_ENC_TUNING_INFO_LOSSLESS,VE,.unit="tune"},
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AV1_AUTOSELECT},NV_ENC_LEVEL_AV1_2,NV_ENC_LEVEL_AV1_AUTOSELECT,VE,.unit="level"},
{"multipass","Set the multipass encoding",OFFSET(multipass),AV_OPT_TYPE_INT,{.i64=NV_ENC_MULTI_PASS_DISABLED},NV_ENC_MULTI_PASS_DISABLED,NV_ENC_TWO_PASS_FULL_RESOLUTION,VE,.unit="multipass"},
{"b_ref_mode","Use B frames as references",OFFSET(b_ref_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,NV_ENC_BFRAME_REF_MODE_MIDDLE,VE,"b_ref_mode"},
{"disabled","B frames will not be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_DISABLED},0,0,VE,"b_ref_mode"},
{"each","Each B frame will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_EACH},0,0,VE,"b_ref_mode"},
{"middle","Only (number of B frames)/2 will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_MIDDLE},0,0,VE,"b_ref_mode"},
{"b_ref_mode","Use B frames as references",OFFSET(b_ref_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,NV_ENC_BFRAME_REF_MODE_MIDDLE,VE,.unit="b_ref_mode"},
{"disabled","B frames will not be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_DISABLED},0,0,VE,.unit="b_ref_mode"},
{"each","Each B frame will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_EACH},0,0,VE,.unit="b_ref_mode"},
{"middle","Only (number of B frames)/2 will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_MIDDLE},0,0,VE,.unit="b_ref_mode"},
{"dpb_size","Specifies the DPB size used for encoding (0 means automatic)",
{"tune","Set the encoding tuning info",OFFSET(tuning_info),AV_OPT_TYPE_INT,{.i64=NV_ENC_TUNING_INFO_HIGH_QUALITY},NV_ENC_TUNING_INFO_HIGH_QUALITY,NV_ENC_TUNING_INFO_LOSSLESS,VE,"tune"},
{"tune","Set the encoding tuning info",OFFSET(tuning_info),AV_OPT_TYPE_INT,{.i64=NV_ENC_TUNING_INFO_HIGH_QUALITY},NV_ENC_TUNING_INFO_HIGH_QUALITY,NV_ENC_TUNING_INFO_LOSSLESS,VE,.unit="tune"},
{"profile","Set the encoding profile",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=NV_ENC_H264_PROFILE_MAIN},NV_ENC_H264_PROFILE_BASELINE,NV_ENC_H264_PROFILE_HIGH_444P,VE,"profile"},
{"profile","Set the encoding profile",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=NV_ENC_H264_PROFILE_MAIN},NV_ENC_H264_PROFILE_BASELINE,NV_ENC_H264_PROFILE_HIGH_444P,VE,.unit="profile"},
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AUTOSELECT},NV_ENC_LEVEL_AUTOSELECT,NV_ENC_LEVEL_H264_62,VE,"level"},
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AUTOSELECT},NV_ENC_LEVEL_AUTOSELECT,NV_ENC_LEVEL_H264_62,VE,.unit="level"},
#else
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AUTOSELECT},NV_ENC_LEVEL_AUTOSELECT,NV_ENC_LEVEL_H264_52,VE,"level"},
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AUTOSELECT},NV_ENC_LEVEL_AUTOSELECT,NV_ENC_LEVEL_H264_52,VE,.unit="level"},
{"b_ref_mode","Use B frames as references",OFFSET(b_ref_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,NV_ENC_BFRAME_REF_MODE_MIDDLE,VE,"b_ref_mode"},
{"disabled","B frames will not be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_DISABLED},0,0,VE,"b_ref_mode"},
{"each","Each B frame will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_EACH},0,0,VE,"b_ref_mode"},
{"middle","Only (number of B frames)/2 will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_MIDDLE},0,0,VE,"b_ref_mode"},
{"b_ref_mode","Use B frames as references",OFFSET(b_ref_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,NV_ENC_BFRAME_REF_MODE_MIDDLE,VE,.unit="b_ref_mode"},
{"disabled","B frames will not be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_DISABLED},0,0,VE,.unit="b_ref_mode"},
{"each","Each B frame will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_EACH},0,0,VE,.unit="b_ref_mode"},
{"middle","Only (number of B frames)/2 will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_MIDDLE},0,0,VE,.unit="b_ref_mode"},
{"multipass","Set the multipass encoding",OFFSET(multipass),AV_OPT_TYPE_INT,{.i64=NV_ENC_MULTI_PASS_DISABLED},NV_ENC_MULTI_PASS_DISABLED,NV_ENC_TWO_PASS_FULL_RESOLUTION,VE,"multipass"},
{"multipass","Set the multipass encoding",OFFSET(multipass),AV_OPT_TYPE_INT,{.i64=NV_ENC_MULTI_PASS_DISABLED},NV_ENC_MULTI_PASS_DISABLED,NV_ENC_TWO_PASS_FULL_RESOLUTION,VE,.unit="multipass"},
{"tune","Set the encoding tuning info",OFFSET(tuning_info),AV_OPT_TYPE_INT,{.i64=NV_ENC_TUNING_INFO_HIGH_QUALITY},NV_ENC_TUNING_INFO_HIGH_QUALITY,NV_ENC_TUNING_INFO_LOSSLESS,VE,"tune"},
{"tune","Set the encoding tuning info",OFFSET(tuning_info),AV_OPT_TYPE_INT,{.i64=NV_ENC_TUNING_INFO_HIGH_QUALITY},NV_ENC_TUNING_INFO_HIGH_QUALITY,NV_ENC_TUNING_INFO_LOSSLESS,VE,.unit="tune"},
{"profile","Set the encoding profile",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=NV_ENC_HEVC_PROFILE_MAIN},NV_ENC_HEVC_PROFILE_MAIN,AV_PROFILE_HEVC_REXT,VE,"profile"},
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AUTOSELECT},NV_ENC_LEVEL_AUTOSELECT,NV_ENC_LEVEL_HEVC_62,VE,"level"},
{"profile","Set the encoding profile",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=NV_ENC_HEVC_PROFILE_MAIN},NV_ENC_HEVC_PROFILE_MAIN,AV_PROFILE_HEVC_REXT,VE,.unit="profile"},
{"level","Set the encoding level restriction",OFFSET(level),AV_OPT_TYPE_INT,{.i64=NV_ENC_LEVEL_AUTOSELECT},NV_ENC_LEVEL_AUTOSELECT,NV_ENC_LEVEL_HEVC_62,VE,.unit="level"},
{"tier","Set the encoding tier",OFFSET(tier),AV_OPT_TYPE_INT,{.i64=NV_ENC_TIER_HEVC_MAIN},NV_ENC_TIER_HEVC_MAIN,NV_ENC_TIER_HEVC_HIGH,VE,.unit="tier"},
{"b_ref_mode","Use B frames as references",OFFSET(b_ref_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,NV_ENC_BFRAME_REF_MODE_MIDDLE,VE,"b_ref_mode"},
{"disabled","B frames will not be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_DISABLED},0,0,VE,"b_ref_mode"},
{"each","Each B frame will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_EACH},0,0,VE,"b_ref_mode"},
{"middle","Only (number of B frames)/2 will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_MIDDLE},0,0,VE,"b_ref_mode"},
{"b_ref_mode","Use B frames as references",OFFSET(b_ref_mode),AV_OPT_TYPE_INT,{.i64=-1},-1,NV_ENC_BFRAME_REF_MODE_MIDDLE,VE,.unit="b_ref_mode"},
{"disabled","B frames will not be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_DISABLED},0,0,VE,.unit="b_ref_mode"},
{"each","Each B frame will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_EACH},0,0,VE,.unit="b_ref_mode"},
{"middle","Only (number of B frames)/2 will be used for reference",0,AV_OPT_TYPE_CONST,{.i64=NV_ENC_BFRAME_REF_MODE_MIDDLE},0,0,VE,.unit="b_ref_mode"},
{"multipass","Set the multipass encoding",OFFSET(multipass),AV_OPT_TYPE_INT,{.i64=NV_ENC_MULTI_PASS_DISABLED},NV_ENC_MULTI_PASS_DISABLED,NV_ENC_TWO_PASS_FULL_RESOLUTION,VE,"multipass"},
{"multipass","Set the multipass encoding",OFFSET(multipass),AV_OPT_TYPE_INT,{.i64=NV_ENC_MULTI_PASS_DISABLED},NV_ENC_MULTI_PASS_DISABLED,NV_ENC_TWO_PASS_FULL_RESOLUTION,VE,.unit="multipass"},
{"profile","Set the encoding profile",OFFSET(profile),AV_OPT_TYPE_INT,{.i64=AV_PROFILE_UNKNOWN},AV_PROFILE_UNKNOWN,AV_PROFILE_H264_HIGH,VE,.unit="profile"},
{"global_header","place global headers in extradata instead of every keyframe",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_GLOBAL_HEADER},INT_MIN,INT_MAX,V|A|E,"flags"},
{"bitexact","use only bitexact functions (except (I)DCT)",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_BITEXACT},INT_MIN,INT_MAX,A|V|S|D|E,"flags"},
{"aic","H.263 advanced intra coding / MPEG-4 AC prediction",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_AC_PRED},INT_MIN,INT_MAX,V|E,"flags"},
{"global_header","place global headers in extradata instead of every keyframe",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_GLOBAL_HEADER},INT_MIN,INT_MAX,V|A|E,.unit="flags"},
{"bitexact","use only bitexact functions (except (I)DCT)",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_BITEXACT},INT_MIN,INT_MAX,A|V|S|D|E,.unit="flags"},
{"aic","H.263 advanced intra coding / MPEG-4 AC prediction",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_AC_PRED},INT_MIN,INT_MAX,V|E,.unit="flags"},
{"output_corrupt","Output even potentially corrupted frames",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_OUTPUT_CORRUPT},INT_MIN,INT_MAX,V|D,.unit="flags"},
#if FF_API_DROPCHANGED
{"drop_changed","Drop frames whose parameters differ from first decoded frame",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_DROPCHANGED},INT_MIN,INT_MAX,A|V|D|AV_OPT_FLAG_DEPRECATED,"flags"},
{"drop_changed","Drop frames whose parameters differ from first decoded frame",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG_DROPCHANGED},INT_MIN,INT_MAX,A|V|D|AV_OPT_FLAG_DEPRECATED,.unit="flags"},
{"ignorecrop","ignore cropping information from sps",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_IGNORE_CROP},INT_MIN,INT_MAX,V|D,"flags2"},
{"local_header","place global headers at every keyframe instead of in extradata",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_LOCAL_HEADER},INT_MIN,INT_MAX,V|E,"flags2"},
{"chunks","Frame data might be split into multiple chunks",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_CHUNKS},INT_MIN,INT_MAX,V|D,"flags2"},
{"showall","Show all frames before the first keyframe",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_SHOW_ALL},INT_MIN,INT_MAX,V|D,"flags2"},
{"export_mvs","export motion vectors through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_EXPORT_MVS},INT_MIN,INT_MAX,V|D,"flags2"},
{"skip_manual","do not skip samples and export skip information as frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_SKIP_MANUAL},INT_MIN,INT_MAX,A|D,"flags2"},
{"ass_ro_flush_noop","do not reset ASS ReadOrder field on flush",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_RO_FLUSH_NOOP},INT_MIN,INT_MAX,S|D,"flags2"},
{"export_side_data","Export metadata as side data",OFFSET(export_side_data),AV_OPT_TYPE_FLAGS,{.i64=DEFAULT},0,UINT_MAX,A|V|S|D|E,"export_side_data"},
{"mvs","export motion vectors through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_MVS},INT_MIN,INT_MAX,V|D,"export_side_data"},
{"prft","export Producer Reference Time through packet side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_PRFT},INT_MIN,INT_MAX,A|V|S|E,"export_side_data"},
{"venc_params","export video encoding parameters through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS},INT_MIN,INT_MAX,V|D,"export_side_data"},
{"film_grain","export film grain parameters through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_FILM_GRAIN},INT_MIN,INT_MAX,V|D,"export_side_data"},
{"ignorecrop","ignore cropping information from sps",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_IGNORE_CROP},INT_MIN,INT_MAX,V|D,.unit="flags2"},
{"local_header","place global headers at every keyframe instead of in extradata",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_LOCAL_HEADER},INT_MIN,INT_MAX,V|E,.unit="flags2"},
{"chunks","Frame data might be split into multiple chunks",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_CHUNKS},INT_MIN,INT_MAX,V|D,.unit="flags2"},
{"showall","Show all frames before the first keyframe",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_SHOW_ALL},INT_MIN,INT_MAX,V|D,.unit="flags2"},
{"export_mvs","export motion vectors through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_EXPORT_MVS},INT_MIN,INT_MAX,V|D,.unit="flags2"},
{"skip_manual","do not skip samples and export skip information as frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_SKIP_MANUAL},INT_MIN,INT_MAX,A|D,.unit="flags2"},
{"ass_ro_flush_noop","do not reset ASS ReadOrder field on flush",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_FLAG2_RO_FLUSH_NOOP},INT_MIN,INT_MAX,S|D,.unit="flags2"},
{"export_side_data","Export metadata as side data",OFFSET(export_side_data),AV_OPT_TYPE_FLAGS,{.i64=DEFAULT},0,UINT_MAX,A|V|S|D|E,.unit="export_side_data"},
{"mvs","export motion vectors through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_MVS},INT_MIN,INT_MAX,V|D,.unit="export_side_data"},
{"prft","export Producer Reference Time through packet side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_PRFT},INT_MIN,INT_MAX,A|V|S|E,.unit="export_side_data"},
{"venc_params","export video encoding parameters through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS},INT_MIN,INT_MAX,V|D,.unit="export_side_data"},
{"film_grain","export film grain parameters through frame side data",0,AV_OPT_TYPE_CONST,{.i64=AV_CODEC_EXPORT_DATA_FILM_GRAIN},INT_MIN,INT_MAX,V|D,.unit="export_side_data"},
{"direct_blocksize","direct-qpel-blocksize bug (autodetected per FOURCC/version)",0,AV_OPT_TYPE_CONST,{.i64=FF_BUG_DIRECT_BLOCKSIZE},INT_MIN,INT_MAX,V|D,"bug"},
{"edge","edge padding bug (autodetected per FOURCC/version)",0,AV_OPT_TYPE_CONST,{.i64=FF_BUG_EDGE},INT_MIN,INT_MAX,V|D,"bug"},
{"strict","how strictly to follow the standards",OFFSET(strict_std_compliance),AV_OPT_TYPE_INT,{.i64=DEFAULT},INT_MIN,INT_MAX,A|V|D|E,"strict"},
{"very","strictly conform to a older more strict version of the spec or reference software",0,AV_OPT_TYPE_CONST,{.i64=FF_COMPLIANCE_VERY_STRICT},INT_MIN,INT_MAX,A|V|D|E,"strict"},
{"strict","strictly conform to all the things in the spec no matter what the consequences",0,AV_OPT_TYPE_CONST,{.i64=FF_COMPLIANCE_STRICT},INT_MIN,INT_MAX,A|V|D|E,"strict"},
{"bug","work around not autodetected encoder bugs",OFFSET(workaround_bugs),AV_OPT_TYPE_FLAGS,{.i64=FF_BUG_AUTODETECT},INT_MIN,INT_MAX,V|D,.unit="bug"},
{"direct_blocksize","direct-qpel-blocksize bug (autodetected per FOURCC/version)",0,AV_OPT_TYPE_CONST,{.i64=FF_BUG_DIRECT_BLOCKSIZE},INT_MIN,INT_MAX,V|D,.unit="bug"},
{"edge","edge padding bug (autodetected per FOURCC/version)",0,AV_OPT_TYPE_CONST,{.i64=FF_BUG_EDGE},INT_MIN,INT_MAX,V|D,.unit="bug"},
{"strict","how strictly to follow the standards",OFFSET(strict_std_compliance),AV_OPT_TYPE_INT,{.i64=DEFAULT},INT_MIN,INT_MAX,A|V|D|E,.unit="strict"},
{"very","strictly conform to a older more strict version of the spec or reference software",0,AV_OPT_TYPE_CONST,{.i64=FF_COMPLIANCE_VERY_STRICT},INT_MIN,INT_MAX,A|V|D|E,.unit="strict"},
{"strict","strictly conform to all the things in the spec no matter what the consequences",0,AV_OPT_TYPE_CONST,{.i64=FF_COMPLIANCE_STRICT},INT_MIN,INT_MAX,A|V|D|E,.unit="strict"},
{"careful","consider things that violate the spec, are fast to check and have not been seen in the wild as errors",0,AV_OPT_TYPE_CONST,{.i64=AV_EF_CAREFUL},INT_MIN,INT_MAX,A|V|S|D|E,"err_detect"},
{"compliant","consider all spec non compliancies as errors",0,AV_OPT_TYPE_CONST,{.i64=AV_EF_COMPLIANT|AV_EF_CAREFUL},INT_MIN,INT_MAX,A|V|S|D|E,"err_detect"},
{"aggressive","consider things that a sane encoder should not do as an error",0,AV_OPT_TYPE_CONST,{.i64=AV_EF_AGGRESSIVE|AV_EF_COMPLIANT|AV_EF_CAREFUL},INT_MIN,INT_MAX,A|V|S|D|E,"err_detect"},
{"careful","consider things that violate the spec, are fast to check and have not been seen in the wild as errors",0,AV_OPT_TYPE_CONST,{.i64=AV_EF_CAREFUL},INT_MIN,INT_MAX,A|V|S|D|E,.unit="err_detect"},
{"compliant","consider all spec non compliancies as errors",0,AV_OPT_TYPE_CONST,{.i64=AV_EF_COMPLIANT|AV_EF_CAREFUL},INT_MIN,INT_MAX,A|V|S|D|E,.unit="err_detect"},
{"aggressive","consider things that a sane encoder should not do as an error",0,AV_OPT_TYPE_CONST,{.i64=AV_EF_AGGRESSIVE|AV_EF_COMPLIANT|AV_EF_CAREFUL},INT_MIN,INT_MAX,A|V|S|D|E,.unit="err_detect"},
{"rd","use best rate distortion",0,AV_OPT_TYPE_CONST,{.i64=FF_MB_DECISION_RD},INT_MIN,INT_MAX,V|E,.unit="mbd"},
{"rc_init_occupancy","number of bits which should be loaded into the rc buffer before decoding starts",OFFSET(rc_initial_buffer_occupancy),AV_OPT_TYPE_INT,{.i64=DEFAULT},INT_MIN,INT_MAX,V|E},
{"threads","set the number of threads",OFFSET(thread_count),AV_OPT_TYPE_INT,{.i64=1},0,INT_MAX,V|A|E|D,"threads"},
{"auto","autodetect a suitable number of threads to use",0,AV_OPT_TYPE_CONST,{.i64=0},INT_MIN,INT_MAX,V|E|D,"threads"},
{"threads","set the number of threads",OFFSET(thread_count),AV_OPT_TYPE_INT,{.i64=1},0,INT_MAX,V|A|E|D,.unit="threads"},
{"auto","autodetect a suitable number of threads to use",0,AV_OPT_TYPE_CONST,{.i64=0},INT_MIN,INT_MAX,V|E|D,.unit="threads"},
{"level","encoding level, usually corresponding to the profile level, codec-specific",OFFSET(level),AV_OPT_TYPE_INT,{.i64=FF_LEVEL_UNKNOWN},INT_MIN,INT_MAX,V|A|E|CC,"avctx.level"},
{"level","encoding level, usually corresponding to the profile level, codec-specific",OFFSET(level),AV_OPT_TYPE_INT,{.i64=FF_LEVEL_UNKNOWN},INT_MIN,INT_MAX,V|A|E|CC,.unit="avctx.level"},
{"skip_loop_filter","skip loop filtering process for the selected frames",OFFSET(skip_loop_filter),AV_OPT_TYPE_INT,{.i64=AVDISCARD_DEFAULT},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"skip_idct","skip IDCT/dequantization for the selected frames",OFFSET(skip_idct),AV_OPT_TYPE_INT,{.i64=AVDISCARD_DEFAULT},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"skip_frame","skip decoding for the selected frames",OFFSET(skip_frame),AV_OPT_TYPE_INT,{.i64=AVDISCARD_DEFAULT},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"none","discard no frame",0,AV_OPT_TYPE_CONST,{.i64=AVDISCARD_NONE},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"noref","discard all non-reference frames",0,AV_OPT_TYPE_CONST,{.i64=AVDISCARD_NONREF},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"bidir","discard all bidirectional frames",0,AV_OPT_TYPE_CONST,{.i64=AVDISCARD_BIDIR},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"nointra","discard all frames except I frames",0,AV_OPT_TYPE_CONST,{.i64=AVDISCARD_NONINTRA},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"nokey","discard all frames except keyframes",0,AV_OPT_TYPE_CONST,{.i64=AVDISCARD_NONKEY},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"all","discard all frames",0,AV_OPT_TYPE_CONST,{.i64=AVDISCARD_ALL},INT_MIN,INT_MAX,V|D,"avdiscard"},
{"skip_loop_filter","skip loop filtering process for the selected frames",OFFSET(skip_loop_filter),AV_OPT_TYPE_INT,{.i64=AVDISCARD_DEFAULT},INT_MIN,INT_MAX,V|D,.unit="avdiscard"},
{"skip_idct","skip IDCT/dequantization for the selected frames",OFFSET(skip_idct),AV_OPT_TYPE_INT,{.i64=AVDISCARD_DEFAULT},INT_MIN,INT_MAX,V|D,.unit="avdiscard"},
{"skip_frame","skip decoding for the selected frames",OFFSET(skip_frame),AV_OPT_TYPE_INT,{.i64=AVDISCARD_DEFAULT},INT_MIN,INT_MAX,V|D,.unit="avdiscard"},
{"none","discard no frame",0,AV_OPT_TYPE_CONST,{.i64=AVDISCARD_NONE},INT_MIN,INT_MAX,V|D,.unit="avdiscard"},
{"audio_service_type","audio service type",OFFSET(audio_service_type),AV_OPT_TYPE_INT,{.i64=AV_AUDIO_SERVICE_TYPE_MAIN},0,AV_AUDIO_SERVICE_TYPE_NB-1,A|E,"audio_service_type"},
{"request_sample_fmt","sample format audio decoders should prefer",OFFSET(request_sample_fmt),AV_OPT_TYPE_SAMPLE_FMT,{.i64=AV_SAMPLE_FMT_NONE},-1,INT_MAX,A|D,"request_sample_fmt"},
{"audio_service_type","audio service type",OFFSET(audio_service_type),AV_OPT_TYPE_INT,{.i64=AV_AUDIO_SERVICE_TYPE_MAIN},0,AV_AUDIO_SERVICE_TYPE_NB-1,A|E,.unit="audio_service_type"},
{"request_sample_fmt","sample format audio decoders should prefer",OFFSET(request_sample_fmt),AV_OPT_TYPE_SAMPLE_FMT,{.i64=AV_SAMPLE_FMT_NONE},-1,INT_MAX,A|D,.unit="request_sample_fmt"},
{"sub_charenc","set input text subtitles character encoding",OFFSET(sub_charenc),AV_OPT_TYPE_STRING,{.str=NULL},0,0,S|D},
{"sub_charenc_mode","set input text subtitles character encoding mode",OFFSET(sub_charenc_mode),AV_OPT_TYPE_FLAGS,{.i64=FF_SUB_CHARENC_MODE_AUTOMATIC},-1,INT_MAX,S|D,"sub_charenc_mode"},
{"sub_charenc_mode","set input text subtitles character encoding mode",OFFSET(sub_charenc_mode),AV_OPT_TYPE_FLAGS,{.i64=FF_SUB_CHARENC_MODE_AUTOMATIC},-1,INT_MAX,S|D,.unit="sub_charenc_mode"},
{"ignore_level","ignore level even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_IGNORE_LEVEL},INT_MIN,INT_MAX,V|D,"hwaccel_flags"},
{"allow_high_depth","allow to output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH},INT_MIN,INT_MAX,V|D,"hwaccel_flags"},
{"allow_profile_mismatch","attempt to decode anyway if HW accelerated decoder's supported profiles do not exactly match the stream",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH},INT_MIN,INT_MAX,V|D,"hwaccel_flags"},
{"unsafe_output","allow potentially unsafe hwaccel frame output that might require special care to process successfully",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_UNSAFE_OUTPUT},INT_MIN,INT_MAX,V|D,"hwaccel_flags"},
{"ignore_level","ignore level even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_IGNORE_LEVEL},INT_MIN,INT_MAX,V|D,.unit="hwaccel_flags"},
{"allow_high_depth","allow to output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH},INT_MIN,INT_MAX,V|D,.unit="hwaccel_flags"},
{"allow_profile_mismatch","attempt to decode anyway if HW accelerated decoder's supported profiles do not exactly match the stream",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH},INT_MIN,INT_MAX,V|D,.unit="hwaccel_flags"},
{"unsafe_output","allow potentially unsafe hwaccel frame output that might require special care to process successfully",0,AV_OPT_TYPE_CONST,{.i64=AV_HWACCEL_FLAG_UNSAFE_OUTPUT},INT_MIN,INT_MAX,V|D,.unit="hwaccel_flags"},
{"extra_hw_frames","Number of extra hardware frames to allocate for the user",OFFSET(extra_hw_frames),AV_OPT_TYPE_INT,{.i64=-1},-1,INT_MAX,V|D},
{"discard_damaged_percentage","Percentage of damaged samples to discard a frame",OFFSET(discard_damaged_percentage),AV_OPT_TYPE_INT,{.i64=95},0,100,V|D},
{"opus_delay","Maximum delay in milliseconds",offsetof(OpusEncContext,options.max_delay_ms),AV_OPT_TYPE_FLOAT,{.dbl=OPUS_MAX_LOOKAHEAD},2.5f,OPUS_MAX_LOOKAHEAD,OPUSENC_FLAGS,"max_delay_ms"},
{"opus_delay","Maximum delay in milliseconds",offsetof(OpusEncContext,options.max_delay_ms),AV_OPT_TYPE_FLOAT,{.dbl=OPUS_MAX_LOOKAHEAD},2.5f,OPUS_MAX_LOOKAHEAD,OPUSENC_FLAGS,.unit="max_delay_ms"},
{"async_depth","Internal parallelization depth, the higher the value the higher the latency.",OFFSET(qsv.async_depth),AV_OPT_TYPE_INT,{.i64=ASYNC_DEPTH_DEFAULT},1,INT_MAX,VD},
{"load_plugin","A user plugin to load in an internal session",OFFSET(load_plugin),AV_OPT_TYPE_INT,{.i64=LOAD_PLUGIN_HEVC_HW},LOAD_PLUGIN_NONE,LOAD_PLUGIN_HEVC_HW,VD,"load_plugin"},
{"load_plugin","A user plugin to load in an internal session",OFFSET(load_plugin),AV_OPT_TYPE_INT,{.i64=LOAD_PLUGIN_HEVC_HW},LOAD_PLUGIN_NONE,LOAD_PLUGIN_HEVC_HW,VD,.unit="load_plugin"},
{"gpu_copy","A GPU-accelerated copy between video and system memory",OFFSET(qsv.gpu_copy),AV_OPT_TYPE_INT,{.i64=MFX_GPUCOPY_DEFAULT},MFX_GPUCOPY_DEFAULT,MFX_GPUCOPY_OFF,VD,"gpu_copy"},
{"gpu_copy","A GPU-accelerated copy between video and system memory",OFFSET(qsv.gpu_copy),AV_OPT_TYPE_INT,{.i64=MFX_GPUCOPY_DEFAULT},MFX_GPUCOPY_DEFAULT,MFX_GPUCOPY_OFF,VD,.unit="gpu_copy"},
{"async_depth","Internal parallelization depth, the higher the value the higher the latency.",OFFSET(qsv.async_depth),AV_OPT_TYPE_INT,{.i64=ASYNC_DEPTH_DEFAULT},1,INT_MAX,VD},
{"gpu_copy","A GPU-accelerated copy between video and system memory",OFFSET(qsv.gpu_copy),AV_OPT_TYPE_INT,{.i64=MFX_GPUCOPY_DEFAULT},MFX_GPUCOPY_DEFAULT,MFX_GPUCOPY_OFF,VD,"gpu_copy"},
{"gpu_copy","A GPU-accelerated copy between video and system memory",OFFSET(qsv.gpu_copy),AV_OPT_TYPE_INT,{.i64=MFX_GPUCOPY_DEFAULT},MFX_GPUCOPY_DEFAULT,MFX_GPUCOPY_OFF,VD,.unit="gpu_copy"},
{"forced_idr","Forcing I frames as IDR frames",OFFSET(qsv.forced_idr),AV_OPT_TYPE_BOOL,{.i64=0},0,1,VE}, \
{"low_power","enable low power mode(experimental: many limitations by mfx version, BRC modes, etc.)",OFFSET(qsv.low_power),AV_OPT_TYPE_BOOL,{.i64=-1},-1,1,VE},
#if QSV_HAVE_HE
#define QSV_HE_OPTIONS \
{"dual_gfx","Prefer processing on both iGfx and dGfx simultaneously",OFFSET(qsv.dual_gfx),AV_OPT_TYPE_INT,{.i64=MFX_HYPERMODE_OFF},MFX_HYPERMODE_OFF,MFX_HYPERMODE_ADAPTIVE,VE,"dual_gfx"}, \
{"on","Enable HyperEncode mode and return error if incompatible parameters during initialization",0,AV_OPT_TYPE_CONST,{.i64=MFX_HYPERMODE_ON},INT_MIN,INT_MAX,VE,"dual_gfx"}, \
{"adaptive","Enable HyperEncode mode or fallback to single GPU if incompatible parameters during initialization",0,AV_OPT_TYPE_CONST,{.i64=MFX_HYPERMODE_ADAPTIVE},INT_MIN,INT_MAX,VE,"dual_gfx"},
{"dual_gfx","Prefer processing on both iGfx and dGfx simultaneously",OFFSET(qsv.dual_gfx),AV_OPT_TYPE_INT,{.i64=MFX_HYPERMODE_OFF},MFX_HYPERMODE_OFF,MFX_HYPERMODE_ADAPTIVE,VE,.unit="dual_gfx"}, \
{"on","Enable HyperEncode mode and return error if incompatible parameters during initialization",0,AV_OPT_TYPE_CONST,{.i64=MFX_HYPERMODE_ON},INT_MIN,INT_MAX,VE,.unit="dual_gfx"}, \
{"adaptive","Enable HyperEncode mode or fallback to single GPU if incompatible parameters during initialization",0,AV_OPT_TYPE_CONST,{.i64=MFX_HYPERMODE_ADAPTIVE},INT_MIN,INT_MAX,VE,.unit="dual_gfx"},
#endif
#define QSV_OPTION_RDO \
@ -122,16 +122,16 @@
#define QSV_OPTION_SCENARIO \
{"scenario","A hint to encoder about the scenario for the encoding session",OFFSET(qsv.scenario),AV_OPT_TYPE_INT,{.i64=MFX_SCENARIO_UNKNOWN}, \
{"tile_cols","Number of columns for tiled encoding",OFFSET(qsv.tile_cols),AV_OPT_TYPE_INT,{.i64=0},0,UINT16_MAX,VE},
{"tile_rows","Number of rows for tiled encoding",OFFSET(qsv.tile_rows),AV_OPT_TYPE_INT,{.i64=0},0,UINT16_MAX,VE},
{"look_ahead_depth","Depth of look ahead in number frames, available when extbrc option is enabled",OFFSET(qsv.look_ahead_depth),AV_OPT_TYPE_INT,{.i64=0},0,100,VE},
{"int_ref_type","Intra refresh type. B frames should be set to 0.",OFFSET(qsv.int_ref_type),AV_OPT_TYPE_INT,{.i64=-1},-1,UINT16_MAX,VE,"int_ref_type"},
{"int_ref_type","Intra refresh type. B frames should be set to 0.",OFFSET(qsv.int_ref_type),AV_OPT_TYPE_INT,{.i64=-1},-1,UINT16_MAX,VE,.unit="int_ref_type"},
{"int_ref_cycle_size","Number of frames in the intra refresh cycle",OFFSET(qsv.int_ref_cycle_size),AV_OPT_TYPE_INT,{.i64=-1},-1,UINT16_MAX,VE},
{"int_ref_qp_delta","QP difference for the refresh MBs",OFFSET(qsv.int_ref_qp_delta),AV_OPT_TYPE_INT,{.i64=INT16_MIN},INT16_MIN,INT16_MAX,VE},
{"recovery_point_sei","Insert recovery point SEI messages",OFFSET(qsv.recovery_point_sei),AV_OPT_TYPE_INT,{.i64=-1},-1,1,VE},
{"int_ref_cycle_dist","Distance between the beginnings of the intra-refresh cycles in frames",OFFSET(qsv.int_ref_cycle_dist),AV_OPT_TYPE_INT,{.i64=-1},-1,INT16_MAX,VE},
{"idr_interval","Distance (in I-frames) between IDR frames",OFFSET(qsv.idr_interval),AV_OPT_TYPE_INT,{.i64=0},-1,INT_MAX,VE,"idr_interval"},
{"begin_only","Output an IDR-frame only at the beginning of the stream",0,AV_OPT_TYPE_CONST,{.i64=-1},0,0,VE,"idr_interval"},
{"load_plugin","A user plugin to load in an internal session",OFFSET(load_plugin),AV_OPT_TYPE_INT,{.i64=LOAD_PLUGIN_HEVC_HW},LOAD_PLUGIN_NONE,LOAD_PLUGIN_HEVC_HW,VE,"load_plugin"},
{"idr_interval","Distance (in I-frames) between IDR frames",OFFSET(qsv.idr_interval),AV_OPT_TYPE_INT,{.i64=0},-1,INT_MAX,VE,.unit="idr_interval"},
{"begin_only","Output an IDR-frame only at the beginning of the stream",0,AV_OPT_TYPE_CONST,{.i64=-1},0,0,VE,.unit="idr_interval"},
{"load_plugin","A user plugin to load in an internal session",OFFSET(load_plugin),AV_OPT_TYPE_INT,{.i64=LOAD_PLUGIN_HEVC_HW},LOAD_PLUGIN_NONE,LOAD_PLUGIN_HEVC_HW,VE,.unit="load_plugin"},
{"look_ahead_depth","Depth of look ahead in number frames, available when extbrc option is enabled",OFFSET(qsv.look_ahead_depth),AV_OPT_TYPE_INT,{.i64=0},0,100,VE},
{"tier","Set the encoding tier (only level >= 4 can support high tier)",OFFSET(qsv.tier),AV_OPT_TYPE_INT,{.i64=MFX_TIER_HEVC_HIGH},MFX_TIER_HEVC_MAIN,MFX_TIER_HEVC_HIGH,VE,"tier"},
{"tier","Set the encoding tier (only level >= 4 can support high tier)",OFFSET(qsv.tier),AV_OPT_TYPE_INT,{.i64=MFX_TIER_HEVC_HIGH},MFX_TIER_HEVC_MAIN,MFX_TIER_HEVC_HIGH,VE,.unit="tier"},
{"int_ref_type","Intra refresh type. B frames should be set to 0",OFFSET(qsv.int_ref_type),AV_OPT_TYPE_INT,{.i64=-1},-1,UINT16_MAX,VE,.unit="int_ref_type"},
{"int_ref_cycle_size","Number of frames in the intra refresh cycle",OFFSET(qsv.int_ref_cycle_size),AV_OPT_TYPE_INT,{.i64=-1},-1,UINT16_MAX,VE},
{"int_ref_qp_delta","QP difference for the refresh MBs",OFFSET(qsv.int_ref_qp_delta),AV_OPT_TYPE_INT,{.i64=INT16_MIN},INT16_MIN,INT16_MAX,VE},
{"int_ref_cycle_dist","Distance between the beginnings of the intra-refresh cycles in frames",OFFSET(qsv.int_ref_cycle_dist),AV_OPT_TYPE_INT,{.i64=-1},-1,INT16_MAX,VE},
@ -485,10 +485,10 @@ static int iec61883_close(AVFormatContext *context)
}
staticconstAVOptionoptions[]={
{"dvtype","override autodetection of DV/HDV",offsetof(structiec61883_data,type),AV_OPT_TYPE_INT,{.i64=IEC61883_AUTO},IEC61883_AUTO,IEC61883_HDV,AV_OPT_FLAG_DECODING_PARAM,"dvtype"},
{"dv","force device being treated as DV device",0,AV_OPT_TYPE_CONST,{.i64=IEC61883_DV},0,0,AV_OPT_FLAG_DECODING_PARAM,"dvtype"},
{"hdv","force device being treated as HDV device",0,AV_OPT_TYPE_CONST,{.i64=IEC61883_HDV},0,0,AV_OPT_FLAG_DECODING_PARAM,"dvtype"},
{"dvtype","override autodetection of DV/HDV",offsetof(structiec61883_data,type),AV_OPT_TYPE_INT,{.i64=IEC61883_AUTO},IEC61883_AUTO,IEC61883_HDV,AV_OPT_FLAG_DECODING_PARAM,.unit="dvtype"},
{"dv","force device being treated as DV device",0,AV_OPT_TYPE_CONST,{.i64=IEC61883_DV},0,0,AV_OPT_FLAG_DECODING_PARAM,.unit="dvtype"},
{"hdv","force device being treated as HDV device",0,AV_OPT_TYPE_CONST,{.i64=IEC61883_HDV},0,0,AV_OPT_FLAG_DECODING_PARAM,.unit="dvtype"},
{"dvbuffer","set queue buffer size (in packets)",offsetof(structiec61883_data,max_packets),AV_OPT_TYPE_INT,{.i64=0},0,INT_MAX,AV_OPT_FLAG_DECODING_PARAM},
{"dvguid","select one of multiple DV devices by its GUID",offsetof(structiec61883_data,device_guid),AV_OPT_TYPE_STRING,{.str=NULL},0,0,AV_OPT_FLAG_DECODING_PARAM},