ref: 002cf3883712cd65e5c5fb0dd1fb9014ec05f328
parent: 8e7c5a3c8db28b5367ae4431b5f2bf22b072b0b0
parent: f1600db3e4f7d2cecfc08d01ec58980073f555bc
author: Yunqing Wang <[email protected]>
date: Mon Apr 3 11:59:50 EDT 2017
Merge "Enhance the row mt sync read to accept the sync_range greater than 1"
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3316,7 +3316,7 @@
MODE_INFO **mi = cm->mi_grid_visible + idx_str;
(*(cpi->row_mt_sync_read_ptr))(&tile_data->row_mt_sync, sb_row,
- sb_col_in_tile - 1);
+ sb_col_in_tile);
if (sf->adaptive_pred_interp_filter) {
for (i = 0; i < 64; ++i) td->leaf_tree[i].pred_interp_filter = SWITCHABLE;
@@ -4094,7 +4094,7 @@
int seg_skip = 0;
(*(cpi->row_mt_sync_read_ptr))(&tile_data->row_mt_sync, sb_row,
- sb_col_in_tile - 1);
+ sb_col_in_tile);
x->source_variance = UINT_MAX;
vp9_zero(x->pred_mv);
--- a/vp9/encoder/vp9_ethread.c
+++ b/vp9/encoder/vp9_ethread.c
@@ -320,7 +320,7 @@
pthread_mutex_t *const mutex = &row_mt_sync->mutex_[r - 1];
pthread_mutex_lock(mutex);
- while (c > row_mt_sync->cur_col[r - 1] - nsync) {
+ while (c > row_mt_sync->cur_col[r - 1] - nsync + 1) {
pthread_cond_wait(&row_mt_sync->cond_[r - 1], mutex);
}
pthread_mutex_unlock(mutex);
@@ -349,7 +349,7 @@
if (c < cols - 1) {
cur = c;
- if (c % nsync) sig = 0;
+ if (c % nsync != nsync - 1) sig = 0;
} else {
cur = cols + nsync;
}
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -884,7 +884,7 @@
const int mb_index = mb_row * cm->mb_cols + mb_col;
#endif
- (*(cpi->row_mt_sync_read_ptr))(&tile_data->row_mt_sync, mb_row, c - 1);
+ (*(cpi->row_mt_sync_read_ptr))(&tile_data->row_mt_sync, mb_row, c);
// Adjust to the next column of MBs.
x->plane[0].src.buf = cpi->Source->y_buffer +