Skip to content

Commit

Permalink
libhb: cleanup video tunes, rename svt-av1 none to vq
Browse files Browse the repository at this point in the history
  • Loading branch information
galad87 committed Jan 15, 2025
1 parent 60e9773 commit 78ca43a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
10 changes: 5 additions & 5 deletions libhb/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@ const char* const* hb_video_encoder_get_presets(int encoder)

case HB_VCODEC_SVT_AV1:
case HB_VCODEC_SVT_AV1_10BIT:
return av1_svt_preset_names;
return hb_av1_svt_preset_names;

default:
return NULL;
Expand All @@ -1860,19 +1860,19 @@ const char* const* hb_video_encoder_get_tunes(int encoder)
{
case HB_VCODEC_X264_8BIT:
case HB_VCODEC_X264_10BIT:
return x264_tune_names;
return hb_x264_tune_names;

#if HB_PROJECT_FEATURE_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;
return hb_x265_tune_names;
#endif

case HB_VCODEC_SVT_AV1:
case HB_VCODEC_SVT_AV1_10BIT:
return av1_svt_tune_names;
return hb_av1_svt_tune_names;

default:
return NULL;
Expand Down Expand Up @@ -1930,7 +1930,7 @@ const char* const* hb_video_encoder_get_profiles(int encoder)

case HB_VCODEC_SVT_AV1:
case HB_VCODEC_SVT_AV1_10BIT:
return av1_svt_profile_names;
return hb_av1_svt_profile_names;

default:
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion libhb/encavcodec.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static const char * const vpx_preset_names[] =

static const char * const vp9_tune_names[] =
{
"screen", "film", NULL
"none", "screen", "film", NULL
};

static const char * const h26x_nvenc_preset_names[] =
Expand Down
8 changes: 4 additions & 4 deletions libhb/handbrake/av1_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ static const int hb_av1_level_values[] = {
-1, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 42,
43, 50, 51, 52, 53, 60, 61, 62, 63, 0 };

static const char * const av1_svt_preset_names[] =
static const char * const hb_av1_svt_preset_names[] =
{
"13", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3", "2", "1", "0", "-1", NULL
};

static const char * const av1_svt_tune_names[] =
static const char * const hb_av1_svt_tune_names[] =
{
"psnr", "ssim", "fastdecode", NULL
"vq", "psnr", "ssim", "fastdecode", NULL
};

static const char * const av1_svt_profile_names[] =
static const char * const hb_av1_svt_profile_names[] =
{
"auto", "main", NULL // "high", "profesional"
};
Expand Down
2 changes: 2 additions & 0 deletions libhb/handbrake/h264_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#ifndef HANDBRAKE_H264_COMMON_H
#define HANDBRAKE_H264_COMMON_H

static const char * const hb_x264_tune_names[] = {
"none", "film", "animation", "grain", "stillimage", "psnr", "ssim", "fastdecode", "zerolatency", NULL };
static const char * const hb_h264_profile_names_8bit[] = {
"auto", "baseline", "main", "high", NULL, };
static const char * const hb_x264_profile_names_8bit[] = {
Expand Down
2 changes: 2 additions & 0 deletions libhb/handbrake/h265_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
// in HEVC, all "random access point" NAL units are keyframes
#define HB_HEVC_NALU_KEYFRAME(nal_unit_type) (((nal_unit_type) >= 16) && ((nal_unit_type) <= 23))

static const char * const hb_x265_tune_names[] = {
"none", "psnr", "ssim", "grain", "zerolatency", "fastdecode", "animation", NULL };
static const char * const hb_h265_tier_names[] = {
"auto", "main", "high", NULL, };
static const char * const hb_h265_profile_names_8bit[] = {
Expand Down
2 changes: 0 additions & 2 deletions macosx/HBVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,6 @@ - (void)setNilValueForKey:(NSString *)key
{
NSMutableArray<NSString *> *temp = [NSMutableArray array];

[temp addObject:@"none"];

const char * const *tunes = hb_video_encoder_get_tunes(self.encoder);

for (int i = 0; tunes != NULL && tunes[i] != NULL; i++)
Expand Down

0 comments on commit 78ca43a

Please sign in to comment.