pv->param.videoParam->mfx.FrameInfo.Height = job->qsv.enc_info.align_height;
// parse user-specified codec profile and level
- if (hb_qsv_profile_parse(&pv->param, pv->qsv_info, job->encoder_profile))
+ if (hb_qsv_profile_parse(&pv->param, pv->qsv_info, job->encoder_profile, job->vcodec))
{
hb_error("encqsvInit: bad profile %s", job->encoder_profile);
return -1;
return error ? HB_QSV_PARAM_BAD_VALUE : HB_QSV_PARAM_OK;
}
-int hb_qsv_profile_parse(hb_qsv_param_t *param, hb_qsv_info_t *info, const char *profile_key)
+int hb_qsv_profile_parse(hb_qsv_param_t *param, hb_qsv_info_t *info, const char *profile_key, const int codec)
{
hb_triplet_t *profile = NULL;
if (profile_key != NULL && *profile_key && strcasecmp(profile_key, "auto"))
}
param->videoParam->mfx.CodecProfile = profile->value;
}
+ /* HEVC 10 bits defautls to Main 10 */
+ else if (((profile_key != NULL && !strcasecmp(profile_key, "auto")) || profile_key == NULL) &&
+ codec == HB_VCODEC_QSV_H265_10BIT &&
+ param->videoParam->mfx.CodecId == MFX_CODEC_HEVC &&
+ qsv_hardware_generation(hb_get_cpu_platform()) >= QSV_G6)
+ {
+ profile = &hb_qsv_h265_profiles[1];
+ param->videoParam->mfx.CodecProfile = profile->value;
+ }
return 0;
}
int hb_qsv_param_default_preset(hb_qsv_param_t *param, mfxVideoParam *videoParam, hb_qsv_info_t *info, const char *preset);
int hb_qsv_param_default (hb_qsv_param_t *param, mfxVideoParam *videoParam, hb_qsv_info_t *info);
int hb_qsv_param_parse (hb_qsv_param_t *param, hb_qsv_info_t *info, const char *key, const char *value);
-int hb_qsv_profile_parse (hb_qsv_param_t *param, hb_qsv_info_t *info, const char *profile_key);
+int hb_qsv_profile_parse (hb_qsv_param_t *param, hb_qsv_info_t *info, const char *profile_key, const int codec);
int hb_qsv_level_parse (hb_qsv_param_t *param, hb_qsv_info_t *info, const char *level_key);
typedef struct