diff options
author | James Zern <jzern@google.com> | 2017-06-27 20:32:15 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2017-07-05 21:07:00 -0700 |
commit | 48c4a038eb8322824927e86e0f9fc215c3cbc1e2 (patch) | |
tree | 167a9fae50cbd6b89c53cae7f52685b454f50c7b /vp9/common | |
parent | af3cab7b245fd8f60ed6a0699f6321ac19986515 (diff) | |
download | libvpx-48c4a038eb8322824927e86e0f9fc215c3cbc1e2.tar libvpx-48c4a038eb8322824927e86e0f9fc215c3cbc1e2.tar.gz libvpx-48c4a038eb8322824927e86e0f9fc215c3cbc1e2.tar.bz2 libvpx-48c4a038eb8322824927e86e0f9fc215c3cbc1e2.zip |
vp9: remove (un)lock_buffer_pool
there is no threaded access to this pool after the removal of
frame_parallel_decode
BUG=webm:1395
Change-Id: I710769b87102edc898c59eb9a2e7a91d8c49107f
Diffstat (limited to 'vp9/common')
-rw-r--r-- | vp9/common/vp9_alloccommon.c | 18 | ||||
-rw-r--r-- | vp9/common/vp9_onyxc_int.h | 14 |
2 files changed, 0 insertions, 32 deletions
diff --git a/vp9/common/vp9_alloccommon.c b/vp9/common/vp9_alloccommon.c index 2fd8c7d5a..fa430b677 100644 --- a/vp9/common/vp9_alloccommon.c +++ b/vp9/common/vp9_alloccommon.c @@ -17,24 +17,6 @@ #include "vp9/common/vp9_entropymv.h" #include "vp9/common/vp9_onyxc_int.h" -// TODO(hkuang): Don't need to lock the whole pool after implementing atomic -// frame reference count. -void lock_buffer_pool(BufferPool *const pool) { -#if CONFIG_MULTITHREAD - pthread_mutex_lock(&pool->pool_mutex); -#else - (void)pool; -#endif -} - -void unlock_buffer_pool(BufferPool *const pool) { -#if CONFIG_MULTITHREAD - pthread_mutex_unlock(&pool->pool_mutex); -#else - (void)pool; -#endif -} - void vp9_set_mb_mi(VP9_COMMON *cm, int width, int height) { const int aligned_width = ALIGN_POWER_OF_TWO(width, MI_SIZE_LOG2); const int aligned_height = ALIGN_POWER_OF_TWO(height, MI_SIZE_LOG2); diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index be0dbee34..5dc7b9de5 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -74,13 +74,6 @@ typedef struct { } RefCntBuffer; typedef struct BufferPool { -// Protect BufferPool from being accessed by several FrameWorkers at -// the same time during frame parallel decode. -// TODO(hkuang): Try to use atomic variable instead of locking the whole pool. -#if CONFIG_MULTITHREAD - pthread_mutex_t pool_mutex; -#endif - // Private data associated with the frame buffer callbacks. void *cb_priv; @@ -264,11 +257,6 @@ typedef struct VP9Common { int above_context_alloc_cols; } VP9_COMMON; -// TODO(hkuang): Don't need to lock the whole pool after implementing atomic -// frame reference count. -void lock_buffer_pool(BufferPool *const pool); -void unlock_buffer_pool(BufferPool *const pool); - static INLINE YV12_BUFFER_CONFIG *get_ref_frame(VP9_COMMON *cm, int index) { if (index < 0 || index >= REF_FRAMES) return NULL; if (cm->ref_frame_map[index] < 0) return NULL; @@ -284,7 +272,6 @@ static INLINE int get_free_fb(VP9_COMMON *cm) { RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs; int i; - lock_buffer_pool(cm->buffer_pool); for (i = 0; i < FRAME_BUFFERS; ++i) if (frame_bufs[i].ref_count == 0) break; @@ -295,7 +282,6 @@ static INLINE int get_free_fb(VP9_COMMON *cm) { i = INVALID_IDX; } - unlock_buffer_pool(cm->buffer_pool); return i; } |