shithub: libvpx

Download patch

ref: ad0ac045d5a5d53a47520018d12a6951b0e8416f
parent: 5e1e6a9f17c637bbd040c082586babd471b7f5e5
author: James Zern <[email protected]>
date: Fri Sep 4 16:24:29 EDT 2015

vp9/decode_tiles_mt: move frame count accum from loop

the check performed within the while was redundant; simply place the
accumulation after all tiles are decoded.

Change-Id: I6a74e87257c775fd8bfc8ac4511e4a6ad8f18346

--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -1738,14 +1738,15 @@
       bit_reader_end = vpx_reader_find_end(&tile_data->bit_reader);
       final_worker = -1;
     }
+  }
 
-    // Accumulate thread frame counts.
-    if (n >= tile_cols && !cm->frame_parallel_decoding_mode) {
-      for (i = 0; i < num_workers; ++i) {
-        TileWorkerData *const tile_data =
-            (TileWorkerData*)pbi->tile_workers[i].data1;
-        vp9_accumulate_frame_counts(&cm->counts, &tile_data->counts, 1);
-      }
+  // Accumulate thread frame counts.
+  if (!cm->frame_parallel_decoding_mode) {
+    int i;
+    for (i = 0; i < num_workers; ++i) {
+      TileWorkerData *const tile_data =
+          (TileWorkerData*)pbi->tile_workers[i].data1;
+      vp9_accumulate_frame_counts(&cm->counts, &tile_data->counts, 1);
     }
   }