From 8792fb4eca9b6ba421e90755405b3b3bc77391fd Mon Sep 17 00:00:00 2001 From: Jeff Zhang Date: Sat, 24 Oct 2026 02:24:15 +0800 Subject: [PATCH] vaapi: raise the in-process RC max_qp to 51 so capped presets reach the QP 51 floor (#102) Co-authored-by: ferstar --- c_engine/vaapi_engine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/c_engine/vaapi_engine.c b/c_engine/vaapi_engine.c index c06ac09..16e228f 100644 --- a/c_engine/vaapi_engine.c +++ b/c_engine/vaapi_engine.c @@ -732,7 +732,9 @@ int vaapi_encode_frame( rc.window_size = 1000; rc.initial_qp = 28; rc.min_qp = 16; - rc.max_qp = 44; + // The driver's VBR raises QP only up to max_qp; 44 blocked the capped presets from reaching + // the QP 51 hardware floor on hard content (2560x1600 testsrc2: 4.16 -> 2.60 Mbps, #33) + rc.max_qp = 51; rc.rc_flags.bits.disable_frame_skip = 1; // a remote desktop must not drop frames silently b.misc[b.misc_n++] = vaapi_create_misc_buffer(engine, VAEncMiscParameterTypeRateControl, &rc, sizeof(rc));