Skip AV1E_SET_TILE_COLUMNS if value is the default The default value of AV1E_SET_TILE_COLUMNS is 0. Skip the aom_codec_control(AV1E_SET_TILE_COLUMNS) call if the value we want to set it to is 0, because the update_extra_cfg() call after setting the value is not that cheap. Also cast the return value of log2() to unsigned int because that is the parameter type of AV1E_SET_TILE_COLUMNS. Remove the aom_codec_control(&codec, AV1E_SET_ROW_MT, 1) call. 1 is the default value of AV1E_SET_ROW_MT. Change-Id: Ie7d066865b12b8766f4d4798a914f1c573f60ba2
diff --git a/examples/svc_encoder_rtc.c b/examples/svc_encoder_rtc.c index 7b1056d..eb336d5 100644 --- a/examples/svc_encoder_rtc.c +++ b/examples/svc_encoder_rtc.c
@@ -1410,9 +1410,10 @@ aom_codec_control(&codec, AV1E_SET_ENABLE_FILTER_INTRA, 0); aom_codec_control(&codec, AV1E_SET_INTRA_DEFAULT_TX_ONLY, 1); - aom_codec_control(&codec, AV1E_SET_TILE_COLUMNS, - cfg.g_threads ? (int)log2(cfg.g_threads) : 0); - if (cfg.g_threads > 1) aom_codec_control(&codec, AV1E_SET_ROW_MT, 1); + if (cfg.g_threads > 1) { + aom_codec_control(&codec, AV1E_SET_TILE_COLUMNS, + (unsigned int)log2(cfg.g_threads)); + } aom_codec_control(&codec, AV1E_SET_TUNE_CONTENT, app_input.tune_content); if (app_input.tune_content == AOM_CONTENT_SCREEN) {