return ret;
}
+int apply_h265_level(hb_work_private_t *pv, x265_param *param,
+ const char *h265_level)
+{
+ if (h265_level == NULL ||
+ !strcasecmp(h265_level, hb_h265_level_names[0]))
+ {
+ return 0;
+ }
+ // Verify that level is valid
+ int i;
+ for (i = 1; hb_h265_level_values[i]; i++)
+ {
+ if (!strcmp(hb_h265_level_names[i], h265_level))
+ {
+ return param_parse(pv, param, "level-idc", h265_level);
+ }
+ }
+
+ // error (invalid or unsupported level), abort
+ hb_error("apply_h265_level: invalid level %s", h265_level);
+ return X265_PARAM_BAD_VALUE;
+}
+
/***********************************************************************
* hb_work_encx265_init
***********************************************************************
{
goto fail;
}
+ if (apply_h265_level(pv, param, job->encoder_level) < 0)
+ {
+ goto fail;
+ }
/* we should now know whether B-frames are enabled */
job->areBframes = (param->bframes > 0) + (param->bframes > 0 &&
{
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
case HB_VCODEC_QSV_H264:
case HB_VCODEC_QSV_H265:
case HB_VCODEC_QSV_H265_10BIT: