Change-Id: Ic82b039a3d42f9aa01b85a3a69facfaa84b43a53
This commit is contained in:
Alex Converse 2015-03-05 12:09:03 -08:00
Родитель 87bf5203af
Коммит 56cc37c642
1 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -79,26 +79,26 @@ void vp9_encode_tiles_mt(VP9_COMP *cpi) {
winterface->init(worker); winterface->init(worker);
if (i < num_workers - 1) { if (i < num_workers - 1) {
thread_data->cpi = cpi; thread_data->cpi = cpi;
// Allocate thread data. // Allocate thread data.
CHECK_MEM_ERROR(cm, thread_data->td, CHECK_MEM_ERROR(cm, thread_data->td,
vpx_memalign(32, sizeof(*thread_data->td))); vpx_memalign(32, sizeof(*thread_data->td)));
vp9_zero(*thread_data->td); vp9_zero(*thread_data->td);
// Set up pc_tree. // Set up pc_tree.
thread_data->td->leaf_tree = NULL; thread_data->td->leaf_tree = NULL;
thread_data->td->pc_tree = NULL; thread_data->td->pc_tree = NULL;
vp9_setup_pc_tree(cm, thread_data->td); vp9_setup_pc_tree(cm, thread_data->td);
// Allocate frame counters in thread data. // Allocate frame counters in thread data.
CHECK_MEM_ERROR(cm, thread_data->td->counts, CHECK_MEM_ERROR(cm, thread_data->td->counts,
vpx_calloc(1, sizeof(*thread_data->td->counts))); vpx_calloc(1, sizeof(*thread_data->td->counts)));
// Create threads // Create threads
if (!winterface->reset(worker)) if (!winterface->reset(worker))
vpx_internal_error(&cm->error, VPX_CODEC_ERROR, vpx_internal_error(&cm->error, VPX_CODEC_ERROR,
"Tile encoder thread creation failed"); "Tile encoder thread creation failed");
} else { } else {
// Main thread acts as a worker and uses the thread data in cpi. // Main thread acts as a worker and uses the thread data in cpi.
thread_data->cpi = cpi; thread_data->cpi = cpi;