mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 09:39:15 +00:00
obs-qsv11: Remove AVBR, QVBR, and VCM
This commit is contained in:
parent
a790302dbd
commit
5bfc2e5150
|
@ -295,11 +295,6 @@ mfxStatus QSV_Encoder_Internal::InitParams(qsv_param_t *pParams,
|
||||||
m_mfxEncParams.mfx.QPB = pParams->nQPB;
|
m_mfxEncParams.mfx.QPB = pParams->nQPB;
|
||||||
m_mfxEncParams.mfx.QPP = pParams->nQPP;
|
m_mfxEncParams.mfx.QPP = pParams->nQPP;
|
||||||
break;
|
break;
|
||||||
case MFX_RATECONTROL_AVBR:
|
|
||||||
m_mfxEncParams.mfx.TargetKbps = pParams->nTargetBitRate;
|
|
||||||
m_mfxEncParams.mfx.Accuracy = pParams->nAccuracy;
|
|
||||||
m_mfxEncParams.mfx.Convergence = pParams->nConvergence;
|
|
||||||
break;
|
|
||||||
case MFX_RATECONTROL_ICQ:
|
case MFX_RATECONTROL_ICQ:
|
||||||
m_mfxEncParams.mfx.ICQQuality = pParams->nICQQuality;
|
m_mfxEncParams.mfx.ICQQuality = pParams->nICQQuality;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4,8 +4,6 @@ MaxBitrate="Max Bitrate"
|
||||||
RateControl="Rate Control"
|
RateControl="Rate Control"
|
||||||
KeyframeIntervalSec="Keyframe Interval (0=auto)"
|
KeyframeIntervalSec="Keyframe Interval (0=auto)"
|
||||||
Profile="Profile"
|
Profile="Profile"
|
||||||
Accuracy="Accuracy"
|
|
||||||
Convergence="Convergence"
|
|
||||||
ICQQuality="ICQ Quality"
|
ICQQuality="ICQ Quality"
|
||||||
Latency="Latency"
|
Latency="Latency"
|
||||||
Latency.ToolTip="There is trade-off between latency and quality.\nIf your case prefers on quality, please select 'normal' mode, which may get > 2s end-to-end latency.\nIf your case requires < 500ms end-to-end latency, please select 'ultra-low' mode."
|
Latency.ToolTip="There is trade-off between latency and quality.\nIf your case prefers on quality, please select 'normal' mode, which may get > 2s end-to-end latency.\nIf your case requires < 500ms end-to-end latency, please select 'ultra-low' mode."
|
||||||
|
|
|
@ -177,8 +177,6 @@ static void obs_qsv_defaults(obs_data_t *settings, int ver,
|
||||||
|
|
||||||
obs_data_set_default_int(settings, "__ver", ver);
|
obs_data_set_default_int(settings, "__ver", ver);
|
||||||
|
|
||||||
obs_data_set_default_int(settings, "accuracy", 1000);
|
|
||||||
obs_data_set_default_int(settings, "convergence", 1);
|
|
||||||
obs_data_set_default_int(settings, "cqp", 23);
|
obs_data_set_default_int(settings, "cqp", 23);
|
||||||
obs_data_set_default_int(settings, "qpi", 23);
|
obs_data_set_default_int(settings, "qpi", 23);
|
||||||
obs_data_set_default_int(settings, "qpp", 23);
|
obs_data_set_default_int(settings, "qpp", 23);
|
||||||
|
@ -225,8 +223,6 @@ static inline void add_strings(obs_property_t *list, const char *const *strings)
|
||||||
#define TEXT_PROFILE obs_module_text("Profile")
|
#define TEXT_PROFILE obs_module_text("Profile")
|
||||||
#define TEXT_LATENCY obs_module_text("Latency")
|
#define TEXT_LATENCY obs_module_text("Latency")
|
||||||
#define TEXT_RATE_CONTROL obs_module_text("RateControl")
|
#define TEXT_RATE_CONTROL obs_module_text("RateControl")
|
||||||
#define TEXT_ACCURACY obs_module_text("Accuracy")
|
|
||||||
#define TEXT_CONVERGENCE obs_module_text("Convergence")
|
|
||||||
#define TEXT_ICQ_QUALITY obs_module_text("ICQQuality")
|
#define TEXT_ICQ_QUALITY obs_module_text("ICQQuality")
|
||||||
#define TEXT_KEYINT_SEC obs_module_text("KeyframeIntervalSec")
|
#define TEXT_KEYINT_SEC obs_module_text("KeyframeIntervalSec")
|
||||||
#define TEXT_BFRAMES obs_module_text("BFrames")
|
#define TEXT_BFRAMES obs_module_text("BFrames")
|
||||||
|
@ -292,6 +288,20 @@ static bool update_latency(obs_data_t *settings)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool update_ratecontrol(obs_data_t *settings)
|
||||||
|
{
|
||||||
|
const char *rate_control =
|
||||||
|
obs_data_get_string(settings, "rate_control");
|
||||||
|
|
||||||
|
if (astrcmpi(rate_control, "VCM") == 0) {
|
||||||
|
obs_data_set_string(settings, "rate_control", "CBR");
|
||||||
|
} else if (astrcmpi(rate_control, "AVBR") == 0) {
|
||||||
|
obs_data_set_string(settings, "rate_control", "VBR");
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool update_enhancements(obs_data_t *settings)
|
static bool update_enhancements(obs_data_t *settings)
|
||||||
{
|
{
|
||||||
bool update = false;
|
bool update = false;
|
||||||
|
@ -352,8 +362,7 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
|
||||||
const char *rate_control =
|
const char *rate_control =
|
||||||
obs_data_get_string(settings, "rate_control");
|
obs_data_get_string(settings, "rate_control");
|
||||||
|
|
||||||
bool bVisible = astrcmpi(rate_control, "VCM") == 0 ||
|
bool bVisible = astrcmpi(rate_control, "VBR") == 0;
|
||||||
astrcmpi(rate_control, "VBR") == 0;
|
|
||||||
p = obs_properties_get(ppts, "max_bitrate");
|
p = obs_properties_get(ppts, "max_bitrate");
|
||||||
obs_property_set_visible(p, bVisible);
|
obs_property_set_visible(p, bVisible);
|
||||||
|
|
||||||
|
@ -362,12 +371,6 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
|
||||||
p = obs_properties_get(ppts, "bitrate");
|
p = obs_properties_get(ppts, "bitrate");
|
||||||
obs_property_set_visible(p, !bVisible);
|
obs_property_set_visible(p, !bVisible);
|
||||||
|
|
||||||
bVisible = astrcmpi(rate_control, "AVBR") == 0;
|
|
||||||
p = obs_properties_get(ppts, "accuracy");
|
|
||||||
obs_property_set_visible(p, bVisible);
|
|
||||||
p = obs_properties_get(ppts, "convergence");
|
|
||||||
obs_property_set_visible(p, bVisible);
|
|
||||||
|
|
||||||
bVisible = astrcmpi(rate_control, "CQP") == 0;
|
bVisible = astrcmpi(rate_control, "CQP") == 0;
|
||||||
p = obs_properties_get(ppts, "qpi");
|
p = obs_properties_get(ppts, "qpi");
|
||||||
if (p)
|
if (p)
|
||||||
|
@ -393,6 +396,7 @@ static bool rate_control_modified(obs_properties_t *ppts, obs_property_t *p,
|
||||||
|
|
||||||
update_latency(settings);
|
update_latency(settings);
|
||||||
update_enhancements(settings);
|
update_enhancements(settings);
|
||||||
|
update_ratecontrol(settings);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -481,9 +485,6 @@ static obs_properties_t *obs_qsv_props(enum qsv_codec codec, void *unused,
|
||||||
20, 1);
|
20, 1);
|
||||||
obs_property_int_set_suffix(prop, " s");
|
obs_property_int_set_suffix(prop, " s");
|
||||||
|
|
||||||
obs_properties_add_int(props, "accuracy", TEXT_ACCURACY, 0, 10000, 1);
|
|
||||||
obs_properties_add_int(props, "convergence", TEXT_CONVERGENCE, 0, 10,
|
|
||||||
1);
|
|
||||||
prop = obs_properties_add_list(props, "latency", TEXT_LATENCY,
|
prop = obs_properties_add_list(props, "latency", TEXT_LATENCY,
|
||||||
OBS_COMBO_TYPE_LIST,
|
OBS_COMBO_TYPE_LIST,
|
||||||
OBS_COMBO_FORMAT_STRING);
|
OBS_COMBO_FORMAT_STRING);
|
||||||
|
@ -539,8 +540,6 @@ static void update_params(struct obs_qsv *obsqsv, obs_data_t *settings)
|
||||||
const char *latency = obs_data_get_string(settings, "latency");
|
const char *latency = obs_data_get_string(settings, "latency");
|
||||||
int target_bitrate = (int)obs_data_get_int(settings, "bitrate");
|
int target_bitrate = (int)obs_data_get_int(settings, "bitrate");
|
||||||
int max_bitrate = (int)obs_data_get_int(settings, "max_bitrate");
|
int max_bitrate = (int)obs_data_get_int(settings, "max_bitrate");
|
||||||
int accuracy = (int)obs_data_get_int(settings, "accuracy");
|
|
||||||
int convergence = (int)obs_data_get_int(settings, "convergence");
|
|
||||||
int qpi = (int)obs_data_get_int(settings, "qpi");
|
int qpi = (int)obs_data_get_int(settings, "qpi");
|
||||||
int qpp = (int)obs_data_get_int(settings, "qpp");
|
int qpp = (int)obs_data_get_int(settings, "qpp");
|
||||||
int qpb = (int)obs_data_get_int(settings, "qpb");
|
int qpb = (int)obs_data_get_int(settings, "qpb");
|
||||||
|
@ -685,12 +684,8 @@ static void update_params(struct obs_qsv *obsqsv, obs_data_t *settings)
|
||||||
obsqsv->params.nRateControl = MFX_RATECONTROL_CBR;
|
obsqsv->params.nRateControl = MFX_RATECONTROL_CBR;
|
||||||
else if (astrcmpi(rate_control, "VBR") == 0)
|
else if (astrcmpi(rate_control, "VBR") == 0)
|
||||||
obsqsv->params.nRateControl = MFX_RATECONTROL_VBR;
|
obsqsv->params.nRateControl = MFX_RATECONTROL_VBR;
|
||||||
else if (astrcmpi(rate_control, "VCM") == 0)
|
|
||||||
obsqsv->params.nRateControl = MFX_RATECONTROL_VCM;
|
|
||||||
else if (astrcmpi(rate_control, "CQP") == 0)
|
else if (astrcmpi(rate_control, "CQP") == 0)
|
||||||
obsqsv->params.nRateControl = MFX_RATECONTROL_CQP;
|
obsqsv->params.nRateControl = MFX_RATECONTROL_CQP;
|
||||||
else if (astrcmpi(rate_control, "AVBR") == 0)
|
|
||||||
obsqsv->params.nRateControl = MFX_RATECONTROL_AVBR;
|
|
||||||
else if (astrcmpi(rate_control, "ICQ") == 0)
|
else if (astrcmpi(rate_control, "ICQ") == 0)
|
||||||
obsqsv->params.nRateControl = MFX_RATECONTROL_ICQ;
|
obsqsv->params.nRateControl = MFX_RATECONTROL_ICQ;
|
||||||
|
|
||||||
|
@ -716,8 +711,6 @@ static void update_params(struct obs_qsv *obsqsv, obs_data_t *settings)
|
||||||
obsqsv->params.nLADEPTH = 10;
|
obsqsv->params.nLADEPTH = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
obsqsv->params.nAccuracy = (mfxU16)accuracy;
|
|
||||||
obsqsv->params.nConvergence = (mfxU16)convergence;
|
|
||||||
if (ver == 1) {
|
if (ver == 1) {
|
||||||
obsqsv->params.nQPI = (mfxU16)qpi;
|
obsqsv->params.nQPI = (mfxU16)qpi;
|
||||||
obsqsv->params.nQPP = (mfxU16)qpp;
|
obsqsv->params.nQPP = (mfxU16)qpp;
|
||||||
|
@ -751,8 +744,7 @@ static void update_params(struct obs_qsv *obsqsv, obs_data_t *settings)
|
||||||
blog(LOG_INFO, "\ttarget_bitrate: %d",
|
blog(LOG_INFO, "\ttarget_bitrate: %d",
|
||||||
(int)obsqsv->params.nTargetBitRate);
|
(int)obsqsv->params.nTargetBitRate);
|
||||||
|
|
||||||
if (obsqsv->params.nRateControl == MFX_RATECONTROL_VBR ||
|
if (obsqsv->params.nRateControl == MFX_RATECONTROL_VBR)
|
||||||
obsqsv->params.nRateControl == MFX_RATECONTROL_VCM)
|
|
||||||
blog(LOG_INFO, "\tmax_bitrate: %d",
|
blog(LOG_INFO, "\tmax_bitrate: %d",
|
||||||
(int)obsqsv->params.nMaxBitRate);
|
(int)obsqsv->params.nMaxBitRate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue