From: James Zern Date: Sat, 5 Sep 2015 03:24:29 +0000 (-0700) Subject: vp9/decode_tiles_mt: move frame count accum from loop X-Git-Tag: v1.5.0~142^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad0ac045d5a5d53a47520018d12a6951b0e8416f;p=libvpx 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 --- diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index 8e7888f92..6004a240a 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1738,14 +1738,15 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, 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); } }