obs-ffmpeg: Add QVBR rate control for VA-API

This commit is contained in:
David Rosca
2024-07-11 15:45:27 +02:00
committed by Ryan Foster
parent 45a89ab199
commit 173487afaf
+4
View File
@@ -224,6 +224,7 @@ static const rc_mode_t *get_rc_mode(const char *name)
static const rc_mode_t RC_MODES[] = {{.name = "CBR", .qp = false, .bitrate = true, .maxrate = false},
{.name = "CQP", .qp = true, .bitrate = false, .maxrate = false},
{.name = "VBR", .qp = false, .bitrate = true, .maxrate = true},
{.name = "QVBR", .qp = true, .bitrate = true, .maxrate = true},
{0}};
const rc_mode_t *rc_mode = RC_MODES;
@@ -953,6 +954,9 @@ static bool vaapi_device_modified(obs_properties_t *ppts, obs_property_t *p, obs
if (vaapi_device_rc_supported(profile, va_dpy, VA_RC_VBR, device))
obs_property_list_add_string(rc_p, "VBR", "VBR");
if (vaapi_device_rc_supported(profile, va_dpy, VA_RC_QVBR, device))
obs_property_list_add_string(rc_p, "QVBR", "QVBR");
if (vaapi_device_rc_supported(profile, va_dpy, VA_RC_CQP, device))
obs_property_list_add_string(rc_p, "CQP", "CQP");