obs-qsv11: Add all TargetUsage values
Using terminology from FFmpeg reference, implement: https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/cloud-computing-quicksync-video-ffmpeg-white-paper.pdf
This commit is contained in:
parent
462ca9d0fe
commit
b9ad1ceb64
@ -74,7 +74,16 @@ static const struct qsv_rate_control_info qsv_ratecontrols[] = {
|
||||
{"AVBR", false}, {"ICQ", true}, {"LA_ICQ", true}, {"LA_CBR", true},
|
||||
{"LA_VBR", true}, {0, false}};
|
||||
static const char *const qsv_profile_names[] = {"high", "main", "baseline", 0};
|
||||
static const char *const qsv_usage_names[] = {"quality", "balanced", "speed",
|
||||
static const char *const qsv_usage_names[] = {"quality",
|
||||
"balanced",
|
||||
"speed",
|
||||
"veryslow",
|
||||
"slower",
|
||||
"slow",
|
||||
"medium",
|
||||
"fast",
|
||||
"faster"
|
||||
"veryfast",
|
||||
0};
|
||||
|
||||
typedef struct qsv_t qsv_t;
|
||||
|
@ -359,6 +359,20 @@ static void update_params(struct obs_qsv *obsqsv, obs_data_t *settings)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_BALANCED;
|
||||
else if (astrcmpi(target_usage, "speed") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_BEST_SPEED;
|
||||
else if (astrcmpi(target_usage, "veryslow") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_1;
|
||||
else if (astrcmpi(target_usage, "slower") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_2;
|
||||
else if (astrcmpi(target_usage, "slow") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_3;
|
||||
else if (astrcmpi(target_usage, "medium") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_4;
|
||||
else if (astrcmpi(target_usage, "fast") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_5;
|
||||
else if (astrcmpi(target_usage, "faster") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_6;
|
||||
else if (astrcmpi(target_usage, "veryfast") == 0)
|
||||
obsqsv->params.nTargetUsage = MFX_TARGETUSAGE_7;
|
||||
|
||||
if (astrcmpi(profile, "baseline") == 0)
|
||||
obsqsv->params.nCodecProfile = MFX_PROFILE_AVC_BASELINE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user