From 5e1e6a9f17c637bbd040c082586babd471b7f5e5 Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 19 Aug 2015 19:57:22 -0700 Subject: [PATCH] VP9Decoder: remove duplicate tile_worker_info unnecessary since: 86f4a3d Remove tile param Change-Id: Iff75d3acf6c5aade833ea0a214c919279403cf97 --- vp9/decoder/vp9_decodeframe.c | 11 ++++------- vp9/decoder/vp9_decoder.c | 1 - vp9/decoder/vp9_decoder.h | 1 - 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index 867f9b5..8e7888f 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1561,9 +1561,10 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi, return vpx_reader_find_end(&tile_data->bit_reader); } -static int tile_worker_hook(TileWorkerData *const tile_data, - const TileInfo *const tile) { +static int tile_worker_hook(TileWorkerData *const tile_data, void *unused) { + const TileInfo *const tile = &tile_data->xd.tile; int mi_row, mi_col; + (void)unused; if (setjmp(tile_data->error_info.jmp)) { tile_data->error_info.setjmp = 0; @@ -1626,8 +1627,6 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, CHECK_MEM_ERROR(cm, pbi->tile_worker_data, vpx_memalign(32, num_threads * sizeof(*pbi->tile_worker_data))); - CHECK_MEM_ERROR(cm, pbi->tile_worker_info, - vpx_malloc(num_threads * sizeof(*pbi->tile_worker_info))); for (i = 0; i < num_threads; ++i) { VPxWorker *const worker = &pbi->tile_workers[i]; ++pbi->num_tile_workers; @@ -1651,7 +1650,7 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, cm->frame_parallel_decoding_mode ? NULL : &tile_data->counts; worker->hook = (VPxWorkerHook)tile_worker_hook; worker->data1 = tile_data; - worker->data2 = &pbi->tile_worker_info[n]; + worker->data2 = NULL; } // Note: this memset assumes above_context[0], [1] and [2] @@ -1701,12 +1700,10 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, for (i = 0; i < num_workers && n < tile_cols; ++i) { VPxWorker *const worker = &pbi->tile_workers[i]; TileWorkerData *const tile_data = (TileWorkerData*)worker->data1; - TileInfo *const tile = (TileInfo*)worker->data2; TileBuffer *const buf = &tile_buffers[0][n]; tile_data->xd.corrupted = 0; vp9_zero(tile_data->dqcoeff); - vp9_tile_init(tile, cm, 0, buf->col); vp9_tile_init(&tile_data->xd.tile, cm, 0, buf->col); setup_token_decoder(buf->data, data_end, buf->size, &cm->error, &tile_data->bit_reader, pbi->decrypt_cb, diff --git a/vp9/decoder/vp9_decoder.c b/vp9/decoder/vp9_decoder.c index 6734d00..61077cd 100644 --- a/vp9/decoder/vp9_decoder.c +++ b/vp9/decoder/vp9_decoder.c @@ -134,7 +134,6 @@ void vp9_decoder_remove(VP9Decoder *pbi) { vpx_get_worker_interface()->end(worker); } vpx_free(pbi->tile_worker_data); - vpx_free(pbi->tile_worker_info); vpx_free(pbi->tile_workers); if (pbi->num_tile_workers > 0) { diff --git a/vp9/decoder/vp9_decoder.h b/vp9/decoder/vp9_decoder.h index 915f9dc..944f7da 100644 --- a/vp9/decoder/vp9_decoder.h +++ b/vp9/decoder/vp9_decoder.h @@ -65,7 +65,6 @@ typedef struct VP9Decoder { VPxWorker lf_worker; VPxWorker *tile_workers; TileWorkerData *tile_worker_data; - TileInfo *tile_worker_info; int num_tile_workers; TileData *tile_data; -- 2.7.4