Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: source/libvpx/vp9/encoder/vp9_ethread.c

Issue 800493003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Keep vp9_iht8x8_add_neon disabled because of http://llvm.org/bugs/show_bug.cgi?id=22178 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encoder.c ('k') | source/libvpx/vp9/encoder/vp9_picklpf.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/encoder/vp9_ethread.c
diff --git a/source/libvpx/vp9/encoder/vp9_ethread.c b/source/libvpx/vp9/encoder/vp9_ethread.c
index daf3da44cc3772f444af1d47c31cc015609ffed5..12fb4d107e4836ad127af285f94f9c20f18f4a11 100644
--- a/source/libvpx/vp9/encoder/vp9_ethread.c
+++ b/source/libvpx/vp9/encoder/vp9_ethread.c
@@ -167,23 +167,24 @@ void vp9_encode_tiles_mt(VP9_COMP *cpi) {
CHECK_MEM_ERROR(cm, cpi->workers,
vpx_malloc(num_workers * sizeof(*cpi->workers)));
+ CHECK_MEM_ERROR(cm, cpi->tile_thr_data,
+ vpx_calloc(num_workers, sizeof(*cpi->tile_thr_data)));
+
for (i = 0; i < num_workers; i++) {
VP9Worker *const worker = &cpi->workers[i];
- EncWorkerData *thread_data;
+ EncWorkerData *thread_data = &cpi->tile_thr_data[i];
++cpi->num_workers;
-
winterface->init(worker);
- CHECK_MEM_ERROR(cm, worker->data1,
- (EncWorkerData*)vpx_calloc(1, sizeof(EncWorkerData)));
- thread_data = (EncWorkerData*)worker->data1;
if (i < num_workers - 1) {
thread_data->cpi = cpi;
// Allocate thread data.
CHECK_MEM_ERROR(cm, thread_data->td,
- vpx_calloc(1, sizeof(*thread_data->td)));
+ vpx_memalign(32, sizeof(*thread_data->td)));
+ vp9_zero(*thread_data->td);
+
// Set up pc_tree.
thread_data->td->leaf_tree = NULL;
thread_data->td->pc_tree = NULL;
@@ -203,17 +204,18 @@ void vp9_encode_tiles_mt(VP9_COMP *cpi) {
thread_data->td = &cpi->td;
}
- // data2 is unused.
- worker->data2 = NULL;
-
winterface->sync(worker);
- worker->hook = (VP9WorkerHook)enc_worker_hook;
}
}
for (i = 0; i < num_workers; i++) {
VP9Worker *const worker = &cpi->workers[i];
- EncWorkerData *const thread_data = (EncWorkerData*)worker->data1;
+ EncWorkerData *thread_data;
+
+ worker->hook = (VP9WorkerHook)enc_worker_hook;
+ worker->data1 = &cpi->tile_thr_data[i];
+ worker->data2 = NULL;
+ thread_data = (EncWorkerData*)worker->data1;
// Before encoding a frame, copy the thread data from cpi.
thread_data->td->mb = cpi->td.mb;
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encoder.c ('k') | source/libvpx/vp9/encoder/vp9_picklpf.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698