summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2018-08-31 03:22:42 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-08-31 03:22:42 +0000
commit94ec37097ed75116f04b59f451509e135d447a2b (patch)
tree51797a15766ae0f9469159dd34b5a5515f7e4439 /vp9/encoder
parent00238b7c01b599627af12cfb908137013b544590 (diff)
parentc47fd31b5a50c33c3ef2152d3c1cf1d8a5fe8810 (diff)
downloadlibvpx-94ec37097ed75116f04b59f451509e135d447a2b.tar
libvpx-94ec37097ed75116f04b59f451509e135d447a2b.tar.gz
libvpx-94ec37097ed75116f04b59f451509e135d447a2b.tar.bz2
libvpx-94ec37097ed75116f04b59f451509e135d447a2b.zip
Merge "cosmetics,lf threading: normalize struct member names"
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_ethread.c38
-rw-r--r--vp9/encoder/vp9_ethread.h4
2 files changed, 21 insertions, 21 deletions
diff --git a/vp9/encoder/vp9_ethread.c b/vp9/encoder/vp9_ethread.c
index e8fc1107b..dc08ef343 100644
--- a/vp9/encoder/vp9_ethread.c
+++ b/vp9/encoder/vp9_ethread.c
@@ -270,19 +270,19 @@ void vp9_row_mt_sync_mem_alloc(VP9RowMTSync *row_mt_sync, VP9_COMMON *cm,
{
int i;
- CHECK_MEM_ERROR(cm, row_mt_sync->mutex_,
- vpx_malloc(sizeof(*row_mt_sync->mutex_) * rows));
- if (row_mt_sync->mutex_) {
+ CHECK_MEM_ERROR(cm, row_mt_sync->mutex,
+ vpx_malloc(sizeof(*row_mt_sync->mutex) * rows));
+ if (row_mt_sync->mutex) {
for (i = 0; i < rows; ++i) {
- pthread_mutex_init(&row_mt_sync->mutex_[i], NULL);
+ pthread_mutex_init(&row_mt_sync->mutex[i], NULL);
}
}
- CHECK_MEM_ERROR(cm, row_mt_sync->cond_,
- vpx_malloc(sizeof(*row_mt_sync->cond_) * rows));
- if (row_mt_sync->cond_) {
+ CHECK_MEM_ERROR(cm, row_mt_sync->cond,
+ vpx_malloc(sizeof(*row_mt_sync->cond) * rows));
+ if (row_mt_sync->cond) {
for (i = 0; i < rows; ++i) {
- pthread_cond_init(&row_mt_sync->cond_[i], NULL);
+ pthread_cond_init(&row_mt_sync->cond[i], NULL);
}
}
}
@@ -301,17 +301,17 @@ void vp9_row_mt_sync_mem_dealloc(VP9RowMTSync *row_mt_sync) {
#if CONFIG_MULTITHREAD
int i;
- if (row_mt_sync->mutex_ != NULL) {
+ if (row_mt_sync->mutex != NULL) {
for (i = 0; i < row_mt_sync->rows; ++i) {
- pthread_mutex_destroy(&row_mt_sync->mutex_[i]);
+ pthread_mutex_destroy(&row_mt_sync->mutex[i]);
}
- vpx_free(row_mt_sync->mutex_);
+ vpx_free(row_mt_sync->mutex);
}
- if (row_mt_sync->cond_ != NULL) {
+ if (row_mt_sync->cond != NULL) {
for (i = 0; i < row_mt_sync->rows; ++i) {
- pthread_cond_destroy(&row_mt_sync->cond_[i]);
+ pthread_cond_destroy(&row_mt_sync->cond[i]);
}
- vpx_free(row_mt_sync->cond_);
+ vpx_free(row_mt_sync->cond);
}
#endif // CONFIG_MULTITHREAD
vpx_free(row_mt_sync->cur_col);
@@ -327,11 +327,11 @@ void vp9_row_mt_sync_read(VP9RowMTSync *const row_mt_sync, int r, int c) {
const int nsync = row_mt_sync->sync_range;
if (r && !(c & (nsync - 1))) {
- pthread_mutex_t *const mutex = &row_mt_sync->mutex_[r - 1];
+ pthread_mutex_t *const mutex = &row_mt_sync->mutex[r - 1];
pthread_mutex_lock(mutex);
while (c > row_mt_sync->cur_col[r - 1] - nsync + 1) {
- pthread_cond_wait(&row_mt_sync->cond_[r - 1], mutex);
+ pthread_cond_wait(&row_mt_sync->cond[r - 1], mutex);
}
pthread_mutex_unlock(mutex);
}
@@ -365,12 +365,12 @@ void vp9_row_mt_sync_write(VP9RowMTSync *const row_mt_sync, int r, int c,
}
if (sig) {
- pthread_mutex_lock(&row_mt_sync->mutex_[r]);
+ pthread_mutex_lock(&row_mt_sync->mutex[r]);
row_mt_sync->cur_col[r] = cur;
- pthread_cond_signal(&row_mt_sync->cond_[r]);
- pthread_mutex_unlock(&row_mt_sync->mutex_[r]);
+ pthread_cond_signal(&row_mt_sync->cond[r]);
+ pthread_mutex_unlock(&row_mt_sync->mutex[r]);
}
#else
(void)row_mt_sync;
diff --git a/vp9/encoder/vp9_ethread.h b/vp9/encoder/vp9_ethread.h
index a396e621d..1a79f3175 100644
--- a/vp9/encoder/vp9_ethread.h
+++ b/vp9/encoder/vp9_ethread.h
@@ -33,8 +33,8 @@ typedef struct EncWorkerData {
// Encoder row synchronization
typedef struct VP9RowMTSyncData {
#if CONFIG_MULTITHREAD
- pthread_mutex_t *mutex_;
- pthread_cond_t *cond_;
+ pthread_mutex_t *mutex;
+ pthread_cond_t *cond;
#endif
// Allocate memory to store the sb/mb block index in each row.
int *cur_col;