@ -687,11 +687,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
q - > extparam_internal [ q - > nb_extparam_internal + + ] = ( mfxExtBuffer * ) & q - > extco ;
q - > extparam_internal [ q - > nb_extparam_internal + + ] = ( mfxExtBuffer * ) & q - > extco ;
if ( avctx - > codec_id = = AV_CODEC_ID_H264 ) {
# if QSV_HAVE_CO2
# if QSV_HAVE_CO2
q - > extco2 . Header . BufferId = MFX_EXTBUFF_CODING_OPTION2 ;
if ( avctx - > codec_id = = AV_CODEC_ID_H264 ) {
q - > extco2 . Header . BufferSz = sizeof ( q - > extco2 ) ;
if ( q - > int_ref_type > = 0 )
if ( q - > int_ref_type > = 0 )
q - > extco2 . IntRefType = q - > int_ref_type ;
q - > extco2 . IntRefType = q - > int_ref_type ;
if ( q - > int_ref_cycle_size > = 0 )
if ( q - > int_ref_cycle_size > = 0 )
@ -703,8 +700,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
q - > extco2 . BitrateLimit = q - > bitrate_limit ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF ;
q - > extco2 . BitrateLimit = q - > bitrate_limit ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF ;
if ( q - > mbbrc > = 0 )
if ( q - > mbbrc > = 0 )
q - > extco2 . MBBRC = q - > mbbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF ;
q - > extco2 . MBBRC = q - > mbbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF ;
if ( q - > extbrc > = 0 )
q - > extco2 . ExtBRC = q - > extbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF ;
if ( q - > max_frame_size > = 0 )
if ( q - > max_frame_size > = 0 )
q - > extco2 . MaxFrameSize = q - > max_frame_size ;
q - > extco2 . MaxFrameSize = q - > max_frame_size ;
@ -752,9 +747,20 @@ FF_ENABLE_DEPRECATION_WARNINGS
q - > extco2 . MaxQPP = q - > extco2 . MaxQPB = q - > extco2 . MaxQPI ;
q - > extco2 . MaxQPP = q - > extco2 . MaxQPB = q - > extco2 . MaxQPI ;
}
}
# endif
# endif
}
if ( avctx - > codec_id = = AV_CODEC_ID_H264 | | avctx - > codec_id = = AV_CODEC_ID_HEVC ) {
if ( q - > extbrc > = 0 )
q - > extco2 . ExtBRC = q - > extbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF ;
q - > extco2 . Header . BufferId = MFX_EXTBUFF_CODING_OPTION2 ;
q - > extco2 . Header . BufferSz = sizeof ( q - > extco2 ) ;
q - > extparam_internal [ q - > nb_extparam_internal + + ] = ( mfxExtBuffer * ) & q - > extco2 ;
q - > extparam_internal [ q - > nb_extparam_internal + + ] = ( mfxExtBuffer * ) & q - > extco2 ;
}
# endif
# endif
if ( avctx - > codec_id = = AV_CODEC_ID_H264 ) {
# if QSV_HAVE_MF
# if QSV_HAVE_MF
if ( QSV_RUNTIME_VERSION_ATLEAST ( q - > ver , 1 , 25 ) ) {
if ( QSV_RUNTIME_VERSION_ATLEAST ( q - > ver , 1 , 25 ) ) {
q - > extmfp . Header . BufferId = MFX_EXTBUFF_MULTI_FRAME_PARAM ;
q - > extmfp . Header . BufferId = MFX_EXTBUFF_MULTI_FRAME_PARAM ;