ref: 65055a5fbde1f192965a3c2d258a69b0b746aa52
parent: cbada4a982f5766337ee155ff8bd28dd0b945462
parent: 50b20b90aabcae5a158fe4a622401c8d005cf24f
author: James Zern <[email protected]>
date: Fri Oct 9 13:52:34 EDT 2015
Merge "vp9/decode_tiles_mt: remove unnecessary local"
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -1643,7 +1643,6 @@
if (pbi->num_tile_workers == 0) {
const int num_threads = pbi->max_threads;
- int i;
CHECK_MEM_ERROR(cm, pbi->tile_workers,
vpx_malloc(num_threads * sizeof(*pbi->tile_workers)));
// Ensure tile data offsets will be properly aligned. This may fail on
@@ -1652,12 +1651,12 @@
CHECK_MEM_ERROR(cm, pbi->tile_worker_data,
vpx_memalign(32, num_threads *
sizeof(*pbi->tile_worker_data)));
- for (i = 0; i < num_threads; ++i) {
- VPxWorker *const worker = &pbi->tile_workers[i];
+ for (n = 0; n < num_threads; ++n) {
+ VPxWorker *const worker = &pbi->tile_workers[n];
++pbi->num_tile_workers;
winterface->init(worker);
- if (i < num_threads - 1 && !winterface->reset(worker)) {
+ if (n < num_threads - 1 && !winterface->reset(worker)) {
vpx_internal_error(&cm->error, VPX_CODEC_ERROR,
"Tile decoder thread creation failed");
}
@@ -1720,11 +1719,9 @@
// Initialize thread frame counts.
if (!cm->frame_parallel_decoding_mode) {
- int i;
-
- for (i = 0; i < num_workers; ++i) {
+ for (n = 0; n < num_workers; ++n) {
TileWorkerData *const tile_data =
- (TileWorkerData*)pbi->tile_workers[i].data1;
+ (TileWorkerData*)pbi->tile_workers[n].data1;
vp9_zero(tile_data->counts);
}
}
@@ -1767,10 +1764,9 @@
// Accumulate thread frame counts.
if (!cm->frame_parallel_decoding_mode) {
- int i;
- for (i = 0; i < num_workers; ++i) {
+ for (n = 0; n < num_workers; ++n) {
TileWorkerData *const tile_data =
- (TileWorkerData*)pbi->tile_workers[i].data1;
+ (TileWorkerData*)pbi->tile_workers[n].data1;
vp9_accumulate_frame_counts(&cm->counts, &tile_data->counts, 1);
}
}