@ -65,10 +65,9 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx)
# define OFFSET(x) offsetof(QSVH264EncContext, x)
# define OFFSET(x) offsetof(QSVH264EncContext, x)
# define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
# define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options [ ] = {
static const AVOption options [ ] = {
{ " async_depth " , " Maximum processing parallelism " , OFFSET ( qsv . async_depth ) , AV_OPT_TYPE_INT , { . i64 = ASYNC_DEPTH_DEFAULT } , 0 , INT_MAX , VE } ,
QSV_COMMON_OPTS
{ " idr_interval " , " Distance (in I-frames) between IDR frames " , OFFSET ( qsv . idr_interval ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , INT_MAX , VE } ,
{ " idr_interval " , " Distance (in I-frames) between IDR frames " , OFFSET ( qsv . idr_interval ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , INT_MAX , VE } ,
{ " avbr_accuracy " , " Accuracy of the AVBR ratecontrol " , OFFSET ( qsv . avbr_accuracy ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , INT_MAX , VE } ,
{ " avbr_convergence " , " Convergence of the AVBR ratecontrol " , OFFSET ( qsv . avbr_convergence ) , AV_OPT_TYPE_INT , { . i64 = 0 } , 0 , INT_MAX , VE } ,
{ " pic_timing_sei " , " Insert picture timing SEI with pic_struct_syntax element " , OFFSET ( qsv . pic_timing_sei ) , AV_OPT_TYPE_INT , { . i64 = 1 } , 0 , 1 , VE } ,
{ " pic_timing_sei " , " Insert picture timing SEI with pic_struct_syntax element " , OFFSET ( qsv . pic_timing_sei ) , AV_OPT_TYPE_INT , { . i64 = 1 } , 0 , 1 , VE } ,
# if QSV_VERSION_ATLEAST(1,7)
# if QSV_VERSION_ATLEAST(1,7)
@ -89,15 +88,6 @@ static const AVOption options[] = {
{ " main " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_PROFILE_AVC_MAIN } , INT_MIN , INT_MAX , VE , " profile " } ,
{ " main " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_PROFILE_AVC_MAIN } , INT_MIN , INT_MAX , VE , " profile " } ,
{ " high " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_PROFILE_AVC_HIGH } , INT_MIN , INT_MAX , VE , " profile " } ,
{ " high " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_PROFILE_AVC_HIGH } , INT_MIN , INT_MAX , VE , " profile " } ,
{ " preset " , NULL , OFFSET ( qsv . preset ) , AV_OPT_TYPE_INT , { . i64 = MFX_TARGETUSAGE_BALANCED } , MFX_TARGETUSAGE_BEST_QUALITY , MFX_TARGETUSAGE_BEST_SPEED , VE , " preset " } ,
{ " veryfast " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_TARGETUSAGE_BEST_SPEED } , INT_MIN , INT_MAX , VE , " preset " } ,
{ " faster " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_TARGETUSAGE_6 } , INT_MIN , INT_MAX , VE , " preset " } ,
{ " fast " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_TARGETUSAGE_5 } , INT_MIN , INT_MAX , VE , " preset " } ,
{ " medium " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_TARGETUSAGE_BALANCED } , INT_MIN , INT_MAX , VE , " preset " } ,
{ " slow " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_TARGETUSAGE_3 } , INT_MIN , INT_MAX , VE , " preset " } ,
{ " slower " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_TARGETUSAGE_2 } , INT_MIN , INT_MAX , VE , " preset " } ,
{ " veryslow " , NULL , 0 , AV_OPT_TYPE_CONST , { . i64 = MFX_TARGETUSAGE_BEST_QUALITY } , INT_MIN , INT_MAX , VE , " preset " } ,
{ NULL } ,
{ NULL } ,
} ;
} ;