summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/src/hb-backend.c5
-rw-r--r--gtk/src/makedeps.py4
-rw-r--r--libhb/common.c53
-rw-r--r--libhb/common.h9
-rw-r--r--libhb/encx265.c101
-rw-r--r--libhb/h265_common.h5
-rw-r--r--libhb/hb_dict.c2
-rw-r--r--libhb/muxavformat.c5
-rw-r--r--libhb/work.c23
-rw-r--r--macosx/HBJob+HBJobConversion.m2
-rw-r--r--macosx/HBVideo+UIAdditions.m2
11 files changed, 145 insertions, 66 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 9b26552d0..afae9d4da 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -999,7 +999,10 @@ ghb_vquality_default(signal_user_data_t *ud)
switch (vcodec)
{
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
return 20;
diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py
index 8abc4cc9d..a0277e840 100644
--- a/gtk/src/makedeps.py
+++ b/gtk/src/makedeps.py
@@ -56,8 +56,8 @@ dep_map = (
DepEntry("VideoEncoder", "x264FastDecode", "x264|x264_10bit", False, True),
DepEntry("VideoEncoder", "x264UseAdvancedOptions", "x264|x264_10bit", False, True),
DepEntry("HideAdvancedVideoSettings", "x264UseAdvancedOptions", "1", True, True),
- DepEntry("VideoEncoder", "VideoOptionExtraWindow", "x264|x264_10bit|x265|mpeg4|mpeg2|VP8", False, True),
- DepEntry("VideoEncoder", "VideoOptionExtraLabel", "x264|x264_10bit|x265|mpeg4|mpeg2|VP8", False, True),
+ DepEntry("VideoEncoder", "VideoOptionExtraWindow", "x264|x264_10bit|x265|x265_10bit|x265_12bit|x265_16bit|mpeg4|mpeg2|VP8", False, True),
+ DepEntry("VideoEncoder", "VideoOptionExtraLabel", "x264|x264_10bit|x265|x265_10bit|x265_12bit|x265_16bit|mpeg4|mpeg2|VP8", False, True),
DepEntry("x264UseAdvancedOptions", "VideoSettingsTable", "1", True, False),
DepEntry("VideoEncoder", "x264_box", "x264|x264_10bit", False, True),
DepEntry("x264UseAdvancedOptions", "x264_box", "0", True, False),
diff --git a/libhb/common.c b/libhb/common.c
index e4ea0c9ed..43c4d7601 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -227,7 +227,10 @@ hb_encoder_internal_t hb_video_encoders[] =
{ { "H.264 (x264)", "x264", "H.264 (libx264)", HB_VCODEC_X264_8BIT, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_H264, },
{ { "H.264 10-bit (x264)", "x264_10bit", "H.264 10-bit (libx264)", HB_VCODEC_X264_10BIT, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_H264, },
{ { "H.264 (Intel QSV)", "qsv_h264", "H.264 (Intel Media SDK)", HB_VCODEC_QSV_H264, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_H264, },
- { { "H.265 (x265)", "x265", "H.265 (libx265)", HB_VCODEC_X265, HB_MUX_AV_MP4|HB_MUX_AV_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
+ { { "H.265 (x265)", "x265", "H.265 (libx265)", HB_VCODEC_X265_8BIT, HB_MUX_AV_MP4|HB_MUX_AV_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
+ { { "H.265 10-bit (x265)", "x265_10bit", "H.265 10-bit (libx265)", HB_VCODEC_X265_10BIT, HB_MUX_AV_MP4|HB_MUX_AV_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
+ { { "H.265 12-bit (x265)", "x265_12bit", "H.265 12-bit (libx265)", HB_VCODEC_X265_12BIT, HB_MUX_AV_MP4|HB_MUX_AV_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
+ { { "H.265 16-bit (x265)", "x265_16bit", "H.265 16-bit (libx265)", HB_VCODEC_X265_16BIT, HB_MUX_AV_MP4|HB_MUX_AV_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
{ { "H.265 (Intel QSV)", "qsv_h265", "H.265 (Intel Media SDK)", HB_VCODEC_QSV_H265, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
{ { "MPEG-4", "mpeg4", "MPEG-4 (libavcodec)", HB_VCODEC_FFMPEG_MPEG4, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_MPEG4, },
{ { "MPEG-2", "mpeg2", "MPEG-2 (libavcodec)", HB_VCODEC_FFMPEG_MPEG2, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_MPEG2, },
@@ -250,10 +253,19 @@ static int hb_video_encoder_is_enabled(int encoder)
case HB_VCODEC_FFMPEG_MPEG4:
case HB_VCODEC_FFMPEG_MPEG2:
case HB_VCODEC_FFMPEG_VP8:
+ return 1;
+
#ifdef USE_X265
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
+ {
+ const x265_api *api;
+ api = x265_api_get(hb_video_encoder_get_depth(encoder));
+ return (api != NULL);
+ };
#endif
- return 1;
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
@@ -1202,7 +1214,10 @@ void hb_video_quality_get_limits(uint32_t codec, float *low, float *high,
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
#ifdef USE_X265
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
#endif
*direction = 1;
*granularity = 0.1;
@@ -1249,7 +1264,10 @@ const char* hb_video_quality_get_name(uint32_t codec)
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
#ifdef USE_X265
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
#endif
return "RF";
@@ -1266,7 +1284,12 @@ int hb_video_encoder_get_depth(int encoder)
switch (encoder)
{
case HB_VCODEC_X264_10BIT:
+ case HB_VCODEC_X265_10BIT:
return 10;
+ case HB_VCODEC_X265_12BIT:
+ return 12;
+ case HB_VCODEC_X265_16BIT:
+ return 16;
default:
return 8;
}
@@ -1288,7 +1311,10 @@ const char* const* hb_video_encoder_get_presets(int encoder)
return x264_preset_names;
#ifdef USE_X265
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
return x265_preset_names;
#endif
default:
@@ -1305,7 +1331,10 @@ const char* const* hb_video_encoder_get_tunes(int encoder)
return x264_tune_names;
#ifdef USE_X265
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
return x265_tune_names;
#endif
default:
@@ -1329,8 +1358,14 @@ const char* const* hb_video_encoder_get_profiles(int encoder)
case HB_VCODEC_X264_10BIT:
return hb_h264_profile_names_10bit;
- case HB_VCODEC_X265:
- return hb_h265_profile_names;
+ case HB_VCODEC_X265_8BIT:
+ return hb_h265_profile_names_8bit;
+ case HB_VCODEC_X265_10BIT:
+ return hb_h265_profile_names_10bit;
+ case HB_VCODEC_X265_12BIT:
+ return hb_h265_profile_names_12bit;
+ case HB_VCODEC_X265_16BIT:
+ return hb_h265_profile_names_16bit;
default:
return NULL;
diff --git a/libhb/common.h b/libhb/common.h
index 5152cbc70..db87a9143 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -523,7 +523,6 @@ struct hb_job_s
#define HB_VCODEC_MASK 0x00FFFFF
#define HB_VCODEC_INVALID 0x0000000
#define HB_VCODEC_THEORA 0x0000002
-#define HB_VCODEC_X265 0x0000004
#define HB_VCODEC_FFMPEG_MPEG4 0x0000010
#define HB_VCODEC_FFMPEG_MPEG2 0x0000020
#define HB_VCODEC_FFMPEG_VP8 0x0000040
@@ -536,7 +535,13 @@ struct hb_job_s
#define HB_VCODEC_X264_10BIT 0x0020000
#define HB_VCODEC_X264_MASK 0x0030000
#define HB_VCODEC_H264_MASK (HB_VCODEC_X264_MASK|HB_VCODEC_QSV_H264)
-#define HB_VCODEC_H265_MASK (HB_VCODEC_X265|HB_VCODEC_QSV_H265)
+#define HB_VCODEC_X265_8BIT 0x0001000
+#define HB_VCODEC_X265 HB_VCODEC_X265_8BIT
+#define HB_VCODEC_X265_10BIT 0x0002000
+#define HB_VCODEC_X265_12BIT 0x0004000
+#define HB_VCODEC_X265_16BIT 0x0008000
+#define HB_VCODEC_X265_MASK 0x000F000
+#define HB_VCODEC_H265_MASK (HB_VCODEC_X265_MASK|HB_VCODEC_QSV_H265)
int vcodec;
double vquality;
diff --git a/libhb/encx265.c b/libhb/encx265.c
index eb449173b..4ce890f99 100644
--- a/libhb/encx265.c
+++ b/libhb/encx265.c
@@ -39,23 +39,26 @@ static const char * const hb_x265_encopt_synonyms[][2] =
struct hb_work_private_s
{
- hb_job_t *job;
- x265_encoder *x265;
- x265_param *param;
+ hb_job_t *job;
+ x265_encoder *x265;
+ x265_param *param;
- int64_t last_stop;
- uint32_t frames_in;
+ int64_t last_stop;
+ uint32_t frames_in;
- hb_list_t *delayed_chapters;
- int64_t next_chapter_pts;
+ hb_list_t *delayed_chapters;
+ int64_t next_chapter_pts;
struct
{
- int64_t duration;
+ int64_t duration;
}
frame_info[FRAME_INFO_SIZE];
- char csvfn[1024];
+ char csvfn[1024];
+
+ // Multiple bit-depth
+ const x265_api *api;
};
// used in delayed_chapters list
@@ -65,9 +68,10 @@ struct chapter_s
int64_t start;
};
-static int param_parse(x265_param *param, const char *key, const char *value)
+static int param_parse(hb_work_private_t *pv, x265_param *param,
+ const char *key, const char *value)
{
- int ret = x265_param_parse(param, key, value);
+ int ret = pv->api->param_parse(param, key, value);
// let x265 sanity check the options for us
switch (ret)
{
@@ -90,20 +94,32 @@ static int param_parse(x265_param *param, const char *key, const char *value)
**********************************************************************/
int encx265Init(hb_work_object_t *w, hb_job_t *job)
{
- hb_work_private_t *pv = calloc(1, sizeof(hb_work_private_t));
- pv->next_chapter_pts = AV_NOPTS_VALUE;
- pv->delayed_chapters = hb_list_init();
- pv->job = job;
- w->private_data = pv;
- int ret;
- hb_rational_t vrate;
- x265_nal *nal;
- uint32_t nnal;
+ hb_work_private_t *pv = calloc(1, sizeof(hb_work_private_t));
+ int ret, depth;
+ hb_rational_t vrate;
+ x265_nal *nal;
+ uint32_t nnal;
+ const char * const *profile_names;
+
+ pv->next_chapter_pts = AV_NOPTS_VALUE;
+ pv->delayed_chapters = hb_list_init();
+ pv->job = job;
+ w->private_data = pv;
+
+ depth = hb_video_encoder_get_depth(job->vcodec);
+ profile_names = hb_video_encoder_get_profiles(job->vcodec);
+ pv->api = x265_api_get(depth);
+
+ if (pv->api == NULL)
+ {
+ hb_error("encx265: x265_api_get failed, bit depth %d.", depth);
+ goto fail;
+ }
- x265_param *param = pv->param = x265_param_alloc();
+ x265_param *param = pv->param = pv->api->param_alloc();
- if (x265_param_default_preset(param,
- job->encoder_preset, job->encoder_tune) < 0)
+ if (pv->api->param_default_preset(param, job->encoder_preset,
+ job->encoder_tune) < 0)
{
hb_error("encx265: x265_param_default_preset failed. Preset (%s) Tune (%s)", job->encoder_preset, job->encoder_tune);
goto fail;
@@ -178,9 +194,9 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
snprintf(colormatrix, sizeof(colormatrix), "%d", job->title->color_matrix);
break;
}
- if (param_parse(param, "colorprim", colorprim) ||
- param_parse(param, "transfer", transfer) ||
- param_parse(param, "colormatrix", colormatrix))
+ if (param_parse(pv, param, "colorprim", colorprim) ||
+ param_parse(pv, param, "transfer", transfer) ||
+ param_parse(pv, param, "colormatrix", colormatrix))
{
goto fail;
}
@@ -200,7 +216,7 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
// here's where the strings are passed to libx265 for parsing
// unknown options or bad values are non-fatal, see encx264.c
- param_parse(param, key, str);
+ param_parse(pv, param, key, str);
free(str);
}
hb_dict_free(&x265_opts);
@@ -228,7 +244,7 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
*/
char sar[22];
snprintf(sar, sizeof(sar), "%d:%d", job->par.num, job->par.den);
- if (param_parse(param, "sar", sar))
+ if (param_parse(pv, param, "sar", sar))
{
goto fail;
}
@@ -249,13 +265,13 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
char pass[2];
snprintf(pass, sizeof(pass), "%d", job->pass_id);
hb_get_tempory_filename(job->h, stats_file, "x265.log");
- if (param_parse(param, "stats", stats_file) ||
- param_parse(param, "pass", pass))
+ if (param_parse(pv, param, "stats", stats_file) ||
+ param_parse(pv, param, "pass", pass))
{
goto fail;
}
if (job->pass_id == HB_PASS_ENCODE_1ST && job->fastfirstpass == 0 &&
- param_parse(param, "slow-firstpass", "1"))
+ param_parse(pv, param, "slow-firstpass", "1"))
{
goto fail;
}
@@ -278,9 +294,9 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
}
/* Apply profile and level settings last. */
- if (job->encoder_profile != NULL &&
- strcasecmp(job->encoder_profile, hb_h265_profile_names[0]) != 0 &&
- x265_param_apply_profile(param, job->encoder_profile) < 0)
+ if (job->encoder_profile != NULL &&
+ strcasecmp(job->encoder_profile, profile_names[0]) != 0 &&
+ pv->api->param_apply_profile(param, job->encoder_profile) < 0)
{
goto fail;
}
@@ -290,9 +306,9 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
param->bBPyramid > 0);
/* Reset global variables before opening a new encoder */
- x265_cleanup();
+ pv->api->cleanup();
- pv->x265 = x265_encoder_open(param);
+ pv->x265 = pv->api->encoder_open(param);
if (pv->x265 == NULL)
{
hb_error("encx265: x265_encoder_open failed.");
@@ -305,7 +321,7 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
* Write the header as is, and let the muxer reformat
* the extradata and output bitstream properly for us.
*/
- ret = x265_encoder_headers(pv->x265, &nal, &nnal);
+ ret = pv->api->encoder_headers(pv->x265, &nal, &nnal);
if (ret < 0)
{
hb_error("encx265: x265_encoder_headers failed (%d)", ret);
@@ -342,8 +358,8 @@ void encx265Close(hb_work_object_t *w)
hb_list_close(&pv->delayed_chapters);
}
- x265_param_free(pv->param);
- x265_encoder_close(pv->x265);
+ pv->api->param_free(pv->param);
+ pv->api->encoder_close(pv->x265);
free(pv);
w->private_data = NULL;
}
@@ -466,7 +482,7 @@ static hb_buffer_t* x265_encode(hb_work_object_t *w, hb_buffer_t *in)
x265_nal *nal;
uint32_t nnal;
- x265_picture_init(pv->param, &pic_in);
+ pv->api->picture_init(pv->param, &pic_in);
pic_in.stride[0] = in->plane[0].stride;
pic_in.stride[1] = in->plane[1].stride;
@@ -522,7 +538,7 @@ static hb_buffer_t* x265_encode(hb_work_object_t *w, hb_buffer_t *in)
pv->last_stop = in->s.stop;
save_frame_info(pv, in);
- if (x265_encoder_encode(pv->x265, &nal, &nnal, &pic_in, &pic_out) > 0)
+ if (pv->api->encoder_encode(pv->x265, &nal, &nnal, &pic_in, &pic_out) > 0)
{
return nal_encode(w, &pic_out, nal, nnal);
}
@@ -544,7 +560,8 @@ int encx265Work(hb_work_object_t *w, hb_buffer_t **buf_in, hb_buffer_t **buf_out
hb_buffer_list_clear(&list);
// flush delayed frames
- while (x265_encoder_encode(pv->x265, &nal, &nnal, NULL, &pic_out) > 0)
+ while (pv->api->encoder_encode(pv->x265, &nal,
+ &nnal, NULL, &pic_out) > 0)
{
hb_buffer_t *buf = nal_encode(w, &pic_out, nal, nnal);
hb_buffer_list_append(&list, buf);
diff --git a/libhb/h265_common.h b/libhb/h265_common.h
index cc1b38708..724ea7d55 100644
--- a/libhb/h265_common.h
+++ b/libhb/h265_common.h
@@ -11,7 +11,10 @@
#define HB_H265_COMMON_H
static const char * const hb_h265_tier_names[] = { "auto", "main", "high", NULL, };
-static const char * const hb_h265_profile_names[] = { "auto", "main", "mainstillpicture", NULL, };
+static const char * const hb_h265_profile_names_8bit[] = { "auto", "main", "mainstillpicture", NULL, };
+static const char * const hb_h265_profile_names_10bit[] = { "auto", "main10", "main10-intra", NULL, };
+static const char * const hb_h265_profile_names_12bit[] = { "auto", "main12", "main12-intra", NULL, };
+static const char * const hb_h265_profile_names_16bit[] = { "auto", "main16", "main16-intra", NULL, };
static const char * const hb_h265_level_names[] = { "auto", "1.0", "2.0", "2.1", "3.0", "3.1", "4.0", "4.1", "5.0", "5.1", "5.2", "6.0", "6.1", "6.2", NULL, };
static const int const hb_h265_level_values[] = { -1, 30, 60, 63, 90, 93, 120, 123, 150, 153, 156, 180, 183, 186, 0, };
diff --git a/libhb/hb_dict.c b/libhb/hb_dict.c
index e634d8efd..268f5541a 100644
--- a/libhb/hb_dict.c
+++ b/libhb/hb_dict.c
@@ -595,7 +595,7 @@ hb_dict_t * hb_encopts_to_dict(const char * encopts, int encoder)
name = hb_x264_encopt_name(name);
#ifdef USE_X265
// x265 has multiple names for some options
- if (encoder == HB_VCODEC_X265)
+ if (encoder & HB_VCODEC_X265_MASK)
name = hb_x265_encopt_name(name);
#endif
if (name != NULL)
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index 1bbece7be..aac09b764 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -324,7 +324,10 @@ static int avformatInit( hb_mux_object_t * m )
}
} break;
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
case HB_VCODEC_QSV_H265:
track->st->codec->codec_id = AV_CODEC_ID_HEVC;
diff --git a/libhb/work.c b/libhb/work.c
index bb122f479..931512999 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -228,7 +228,10 @@ hb_work_object_t* hb_video_encoder(hb_handle_t *h, int vcodec)
w = hb_get_work(h, WORK_ENCTHEORA);
break;
#ifdef USE_X265
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
w = hb_get_work(h, WORK_ENCX265);
break;
#endif
@@ -415,7 +418,10 @@ void hb_display_job_info(hb_job_t *job)
{
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
case HB_VCODEC_QSV_H264:
case HB_VCODEC_QSV_H265:
hb_log(" + preset: %s", job->encoder_preset);
@@ -429,7 +435,10 @@ void hb_display_job_info(hb_job_t *job)
{
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
hb_log(" + tune: %s", job->encoder_tune);
default:
break;
@@ -446,7 +455,10 @@ void hb_display_job_info(hb_job_t *job)
{
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
- case HB_VCODEC_X265:
+ case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_X265_10BIT:
+ case HB_VCODEC_X265_12BIT:
+ case HB_VCODEC_X265_16BIT:
case HB_VCODEC_QSV_H264:
case HB_VCODEC_QSV_H265:
hb_log(" + profile: %s", job->encoder_profile);
@@ -477,7 +489,8 @@ void hb_display_job_info(hb_job_t *job)
{
hb_log( " + bitrate: %d kbps, pass: %d", job->vbitrate, job->pass_id );
if(job->pass_id == HB_PASS_ENCODE_1ST && job->fastfirstpass == 1 &&
- ((job->vcodec & HB_VCODEC_X264_MASK) || job->vcodec == HB_VCODEC_X265))
+ ((job->vcodec & HB_VCODEC_X264_MASK) ||
+ (job->vcodec & HB_VCODEC_X265_MASK)))
{
hb_log( " + fast first pass" );
if (job->vcodec & HB_VCODEC_X264_MASK)
diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m
index f19e3c125..78fc16229 100644
--- a/macosx/HBJob+HBJobConversion.m
+++ b/macosx/HBJob+HBJobConversion.m
@@ -110,7 +110,7 @@
}
if (self.video.twoPass && ((self.video.encoder & HB_VCODEC_X264_MASK) ||
- self.video.encoder == HB_VCODEC_X265))
+ (self.video.encoder & HB_VCODEC_X265_MASK)))
{
job->fastfirstpass = self.video.turboTwoPass;
}
diff --git a/macosx/HBVideo+UIAdditions.m b/macosx/HBVideo+UIAdditions.m
index 0d6aaf1c1..1ca41ef0b 100644
--- a/macosx/HBVideo+UIAdditions.m
+++ b/macosx/HBVideo+UIAdditions.m
@@ -84,7 +84,7 @@
- (BOOL)turboTwoPassSupported
{
return ((self.encoder & HB_VCODEC_X264_MASK) ||
- self.encoder == HB_VCODEC_X265);
+ (self.encoder & HB_VCODEC_X265_MASK));
}
/**