summaryrefslogtreecommitdiff
path: root/libavcodec/pthread_slice.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-30 20:31:35 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-25 23:32:34 +0200
commitb4ca3c7e4e4a098651f013b80d9d88cc1dc4d6b7 (patch)
tree253184b90a808629433917b8459c42169b0635a0 /libavcodec/pthread_slice.c
parentdb99ca21500534d1ca3eecc1039f1f45394569e1 (diff)
downloadffmpeg-b4ca3c7e4e4a098651f013b80d9d88cc1dc4d6b7.tar.gz
avcodec/pthread_slice: Combine allocating and zeroing entries
Actually, ff_slice_thread_allocz_entries() always already allocates zeroed entries, so ff_reset_entries() was already unnecessary. Make this more clear by renaming it to ff_slice_thread_allocz_entries(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/pthread_slice.c')
-rw-r--r--libavcodec/pthread_slice.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libavcodec/pthread_slice.c b/libavcodec/pthread_slice.c
index e34116116d..756cc59dbf 100644
--- a/libavcodec/pthread_slice.c
+++ b/libavcodec/pthread_slice.c
@@ -237,7 +237,7 @@ void ff_thread_await_progress2(AVCodecContext *avctx, int field, int thread, int
pthread_mutex_unlock(&progress->mutex);
}
-int ff_alloc_entries(AVCodecContext *avctx, int count)
+int ff_slice_thread_allocz_entries(AVCodecContext *avctx, int count)
{
if (avctx->active_thread_type & FF_THREAD_SLICE) {
SliceThreadContext *p = avctx->internal->thread_ctx;
@@ -256,9 +256,3 @@ int ff_alloc_entries(AVCodecContext *avctx, int count)
return 0;
}
-
-void ff_reset_entries(AVCodecContext *avctx)
-{
- SliceThreadContext *p = avctx->internal->thread_ctx;
- memset(p->entries, 0, p->entries_count * sizeof(int));
-}