obs-ffmpeg: Use 2 tile columns in NVENC AV1 for 4K+

When resolution is 4K or higher, use 2 tile columns for NVENC AV1.
This commit is contained in:
Ryan Foster
2024-01-18 17:52:42 -05:00
parent 5d0323ea0a
commit c25f0592ae
+8
View File
@@ -938,6 +938,14 @@ static bool init_encoder_av1(struct nvenc_data *enc, obs_data_t *settings,
if (config->rcParams.rateControlMode == NV_ENC_PARAMS_RC_CBR)
av1_config->enableBitstreamPadding = 1;
#define PIXELCOUNT_4K (3840 * 2160)
/* If size is 4K+, set tiles to 2 uniform columns. */
if ((voi->width * voi->height) >= PIXELCOUNT_4K) {
av1_config->enableCustomTileConfig = 0;
av1_config->numTileColumns = 2;
}
switch (voi->colorspace) {
case VIDEO_CS_601:
av1_config->colorPrimaries = 6;