summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ethread.c
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2015-01-14 15:51:56 -0800
committerYunqing Wang <yunqingwang@google.com>2015-01-14 15:51:56 -0800
commit99b99831e467ad97336103e48f22e9c7956a51ef (patch)
treedc84c6442eae036ce64dc9bb299237da7687aba8 /vp9/encoder/vp9_ethread.c
parentf7fd03f9969348643983898115fb10cc4ced9867 (diff)
downloadlibvpx-99b99831e467ad97336103e48f22e9c7956a51ef.tar
libvpx-99b99831e467ad97336103e48f22e9c7956a51ef.tar.gz
libvpx-99b99831e467ad97336103e48f22e9c7956a51ef.tar.bz2
libvpx-99b99831e467ad97336103e48f22e9c7956a51ef.zip
Align thread data in vp9_ethread
On some platforms, such as 32bit Windows and 32bit Mac, the allocated memory isn't aligned automatically. The thread data is aligned to ensure the correct access in SIMD code. Change-Id: I1108c145fe982ddbd3d9324952758297120e4806
Diffstat (limited to 'vp9/encoder/vp9_ethread.c')
-rw-r--r--vp9/encoder/vp9_ethread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_ethread.c b/vp9/encoder/vp9_ethread.c
index daf3da44c..9ee32366c 100644
--- a/vp9/encoder/vp9_ethread.c
+++ b/vp9/encoder/vp9_ethread.c
@@ -183,7 +183,9 @@ void vp9_encode_tiles_mt(VP9_COMP *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;