Update cpi->row_mt conditionally
cpi->row_mt is now updated only if --row_mt=1 is passed as an
encoding parameter and num_threads > 1.
Change-Id: I2d1dfbb8c4422fcdecb4f1cc86be5a14dfab610d
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 2d87eb7..39c6eb3 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -5552,10 +5552,11 @@
cpi->row_mt_sync_read_ptr = av1_row_mt_sync_read_dummy;
cpi->row_mt_sync_write_ptr = av1_row_mt_sync_write_dummy;
- if (cpi->row_mt && (cpi->oxcf.max_threads > 1)) {
+ cpi->row_mt = 0;
+ if (cpi->oxcf.row_mt && (cpi->oxcf.max_threads > 1)) {
+ cpi->row_mt = 1;
av1_encode_tiles_row_mt(cpi);
} else {
- cpi->row_mt = 0;
if (AOMMIN(cpi->oxcf.max_threads, cm->tile_cols * cm->tile_rows) > 1)
av1_encode_tiles_mt(cpi);
else
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 4470f92..5d3d75a 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -2400,7 +2400,6 @@
cpi->oxcf = *oxcf;
cpi->common.options = oxcf->cfg;
- cpi->row_mt = oxcf->row_mt;
x->e_mbd.bd = (int)seq_params->bit_depth;
x->e_mbd.global_motion = cm->global_motion;
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index c72a412..c14e8bd 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -575,7 +575,7 @@
if (cpi->oxcf.using_dist_8x8) x->min_partition_size = BLOCK_8X8;
#endif // CONFIG_DIST_8X8
- if (cpi->row_mt == 1) {
+ if (cpi->oxcf.row_mt == 1) {
sf->adaptive_rd_thresh = 0;
sf->inter_mode_rd_model_estimation = 0;
}