summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authorJohn Stebbins <jstebbins@jetheaddev.com>2015-10-12 13:44:11 -0700
committerJohn Stebbins <jstebbins.hb@gmail.com>2015-11-12 10:06:30 -0800
commit2c9d144740e0133cdf389ec814626439700b64f7 (patch)
treee6d847dd82bbaa02e618e34745b13b4eeeab7a83 /libhb/common.c
parent02585c6faf9163a1b1bab9ce537afb7044dc35f6 (diff)
x265: add support for 10, 12, and 16 bit x265 libs
automatically pull in shared versions of these libs or allow statically building against any one of them.
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c53
1 files changed, 44 insertions, 9 deletions
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;