summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2018-12-20 00:10:47 -0800
committerJames Zern <jzern@google.com>2018-12-20 00:22:56 -0800
commit3035d5c547029d4df1266d89f5ef57fc0dc60e71 (patch)
treeb415453c9b0e40f27fcabe455ca81f71d4a0185c /vp9
parent640b3195cb41d2166880e9441349a2d3b3024329 (diff)
downloadlibvpx-3035d5c547029d4df1266d89f5ef57fc0dc60e71.tar
libvpx-3035d5c547029d4df1266d89f5ef57fc0dc60e71.tar.gz
libvpx-3035d5c547029d4df1266d89f5ef57fc0dc60e71.tar.bz2
libvpx-3035d5c547029d4df1266d89f5ef57fc0dc60e71.zip
vp9: limit lpf workers to min(threads,tiles,sb_rows)
this implementation does not scale well beyond that. this restores the performance in v1.7.0. BUG=webm:1574 Change-Id: I8f3464cfe871988fa06ebefe9954811fd002584e
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_thread_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vp9/common/vp9_thread_common.c b/vp9/common/vp9_thread_common.c
index ba9aa69d0..b008ed5cf 100644
--- a/vp9/common/vp9_thread_common.c
+++ b/vp9/common/vp9_thread_common.c
@@ -159,7 +159,12 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, VP9_COMMON *cm,
const VPxWorkerInterface *const winterface = vpx_get_worker_interface();
// Number of superblock rows and cols
const int sb_rows = mi_cols_aligned_to_sb(cm->mi_rows) >> MI_BLOCK_SIZE_LOG2;
- const int num_workers = VPXMIN(nworkers, sb_rows);
+ const int num_tile_cols = 1 << cm->log2_tile_cols;
+ // Limit the number of workers to prevent changes in frame dimensions from
+ // causing incorrect sync calculations when sb_rows < threads/tile_cols.
+ // Further restrict them by the number of tile columns should the user
+ // request more as this implementation doesn't scale well beyond that.
+ const int num_workers = VPXMIN(nworkers, VPXMIN(num_tile_cols, sb_rows));
int i;
if (!lf_sync->sync_range || sb_rows != lf_sync->rows ||