|
@@ -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;
|