loop_filter_rows_mt: remove dependency on 'last_height'
authorJames Zern <jzern@google.com>
Sat, 14 Feb 2015 02:03:45 +0000 (18:03 -0800)
committerJames Zern <jzern@google.com>
Sat, 14 Feb 2015 03:11:23 +0000 (19:11 -0800)
using this to control reallocation would miss a change if the function
were not called for every frame.
fixes potential memory corruption by the subsequent memset

Change-Id: I4c6bb6ab68803104fc824c7e27cc2f9b2cf53e33

vp9/common/vp9_thread_common.c

index 1a93a34..27a3212 100644 (file)
@@ -153,7 +153,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame,
   const int num_workers = MIN(nworkers, tile_cols);
   int i;
 
-  if (!lf_sync->sync_range || cm->last_height != cm->height ||
+  if (!lf_sync->sync_range || sb_rows != lf_sync->rows ||
       num_workers > lf_sync->num_workers) {
     vp9_loop_filter_dealloc(lf_sync);
     vp9_loop_filter_alloc(lf_sync, cm, sb_rows, cm->width, num_workers);