mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-30 17:58:37 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user