summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authormatthew <[email protected]>2017-10-08 12:16:37 -0400
committermatthew <[email protected]>2017-10-08 12:16:37 -0400
commit06e5989e518cc0c2e03038ebd9d94fc318d87b98 (patch)
tree07801173ba76cafde8ddd1789d753c0e00c22bc6 /libhb/common.c
parentb08f366e31ab7c8dd7a14b1b69379e8588d59cbb (diff)
updated libhb/common.c values to match those provided by sr55 gist.
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 5d3a70432..aa1ebdd46 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -42,15 +42,15 @@ static hb_error_handler_t *error_handler = NULL;
enum
{
HB_GID_NONE = -1, // encoders must NEVER use it
- HB_GID_VCODEC_H264,
- HB_GID_VCODEC_H264_NVENC,
- HB_GID_VCODEC_HEVC_NVENC,
+ HB_GID_VCODEC_H264,
HB_GID_VCODEC_H265,
HB_GID_VCODEC_MPEG2,
HB_GID_VCODEC_MPEG4,
HB_GID_VCODEC_THEORA,
HB_GID_VCODEC_VP8,
HB_GID_VCODEC_VP9,
+ HB_GID_VCODEC_FF_H264,
+ HB_GID_VCODEC_FF_H265,
HB_GID_ACODEC_AAC,
HB_GID_ACODEC_AAC_HE,
HB_GID_ACODEC_AAC_PASS,
@@ -238,8 +238,8 @@ 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.264 (NVENC)", "h264_nvenc", "H.264 (NVENC)", HB_VCODEC_H264_NVENC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_H264, },
- { { "H.264 (HEVC)", "hvec_nvenc", "H.264 (HEVC)", HB_VCODEC_HEVC_NVENC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
+ { { "H.264 (NVENC)", "h264_nvenc", "H.264 (NVENC)", HB_VCODEC_FFMPEG_H264, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_FF_H264, },
+ { { "H.265 (NVENC)", "hvec_nvenc", "H.265 (NVENC)", HB_VCODEC_FFMPEG_H265, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_FF_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, },
@@ -267,8 +267,6 @@ static int hb_video_encoder_is_enabled(int encoder)
case HB_VCODEC_THEORA:
case HB_VCODEC_FFMPEG_MPEG4:
case HB_VCODEC_FFMPEG_MPEG2:
- case HB_VCODEC_H264_NVENC:
- case HB_VCODEC_HEVC_NVENC:
case HB_VCODEC_FFMPEG_VP8:
case HB_VCODEC_FFMPEG_VP9:
return 1;
@@ -293,6 +291,11 @@ static int hb_video_encoder_is_enabled(int encoder)
return (api != NULL);
}
+ case HB_VCODEC_FFMPEG_H264:
+ case HB_VCODEC_FFMPEG_H265:
+ {
+ return 1; // TODO check hardware (possible to just see if the driver exists and toggle off that?)
+ }
default:
return 0;
}
@@ -1296,6 +1299,8 @@ void hb_video_quality_get_limits(uint32_t codec, float *low, float *high,
*/
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_FFMPEG_H264:
+ case HB_VCODEC_FFMPEG_H265:
*direction = 1;
*granularity = 0.1;
*low = 0.;
@@ -1364,6 +1369,8 @@ const char* hb_video_quality_get_name(uint32_t codec)
case HB_VCODEC_X265_10BIT:
case HB_VCODEC_X265_12BIT:
case HB_VCODEC_X265_16BIT:
+ case HB_VCODEC_FFMPEG_H264:
+ case HB_VCODEC_FFMPEG_H265:
return "RF";
case HB_VCODEC_FFMPEG_VP8:
@@ -1458,11 +1465,13 @@ const char* const* hb_video_encoder_get_profiles(int encoder)
switch (encoder)
{
case HB_VCODEC_X264_8BIT:
+ case HB_VCODEC_FFMPEG_H264:
return hb_h264_profile_names_8bit;
case HB_VCODEC_X264_10BIT:
return hb_h264_profile_names_10bit;
case HB_VCODEC_X265_8BIT:
+ case HB_VCODEC_FFMPEG_H265:
return hb_h265_profile_names_8bit;
case HB_VCODEC_X265_10BIT:
return hb_h265_profile_names_10bit;
@@ -1489,6 +1498,7 @@ const char* const* hb_video_encoder_get_levels(int encoder)
{
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
+ case HB_VCODEC_FFMPEG_H264:
return hb_h264_level_names;
default: