Skip to content

Commit

Permalink
LinGui: support multi-pass CQ with VP9
Browse files Browse the repository at this point in the history
  • Loading branch information
samhutchins authored and galad87 committed Apr 6, 2024
1 parent 0ccd2ba commit c8ea8a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
17 changes: 13 additions & 4 deletions gtk/src/queuehandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,23 +293,32 @@ static void queue_update_summary (GhbValue * queueDict, signal_user_data_t *ud)
{
// ABR
int br = ghb_dict_get_int(uiDict, "VideoAvgBitrate");
if (!multi_pass)
if (multi_pass && hb_video_multipass_is_supported(video_encoder->codec))
{
g_string_append_printf(str, _("%s, Bitrate %dkbps"),
g_string_append_printf(str, _("%s, Bitrate %dkbps (Multi Pass)"),
video_encoder->name, br);
}
else
{
g_string_append_printf(str, _("%s, Bitrate %dkbps (Multi Pass)"),
g_string_append_printf(str, _("%s, Bitrate %dkbps"),
video_encoder->name, br);
}
}
else
{
gdouble quality = ghb_dict_get_double(uiDict, "VideoQualitySlider");
g_string_append_printf(str, _("%s, Constant Quality %.4g(%s)"),
if (multi_pass && hb_video_cq_multipass_is_supported(video_encoder->codec))
{
g_string_append_printf(str, _("%s, Constant Quality %.4g(%s) (Multi Pass)"),
video_encoder->name, quality,
hb_video_quality_get_name(video_encoder->codec));
}
else
{
g_string_append_printf(str, _("%s, Constant Quality %.4g(%s)"),
video_encoder->name, quality,
hb_video_quality_get_name(video_encoder->codec));
}
}
const char * enc_preset = NULL;
const char * enc_tune = NULL;
Expand Down
1 change: 0 additions & 1 deletion gtk/src/ui/ghb.ui
Original file line number Diff line number Diff line change
Expand Up @@ -3523,7 +3523,6 @@ to limit instantaneous bitrate, look into x264's vbv-bufsize and vbv-maxrat
<child>
<object class="GtkBox" id="VideoMultiPassBox">
<property name="spacing">20</property>
<property name="margin-start">10</property>
<child>
<object class="GtkCheckButton" id="VideoMultiPass">
<property name="label" translatable="yes">Multi-Pass Encoding</property>
Expand Down
3 changes: 2 additions & 1 deletion gtk/src/videohandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ ghb_update_multipass(signal_user_data_t *ud)
bool constant_quality = ghb_dict_get_bool(ud->settings, "vquality_type_constant");
if (constant_quality)
{
gtk_widget_set_sensitive(multi_pass, false);
bool supports_cq_multi_pass = hb_video_cq_multipass_is_supported(encoder);
gtk_widget_set_sensitive(multi_pass, supports_cq_multi_pass);
}
else
{
Expand Down

0 comments on commit c8ea8a9

Please sign in to comment.