diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-02-06 07:44:10 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-02-09 17:22:23 +0100 |
commit | f025b8e110b36c1cdb4fb56c4cd57aeca1767b5b (patch) | |
tree | 3b668e0c57158154ea4b7bdaa13cbd5ad23221da /libavcodec/vp8.c | |
parent | b3551b6072687539c9e162fcec9e1e42a668ee8c (diff) | |
download | ffmpeg-f025b8e110b36c1cdb4fb56c4cd57aeca1767b5b.tar.gz |
avcodec/threadframe: Add ff_thread_(get|release)_ext_buffer()
These will be used by the codecs that need allocated progress
and is in preparation for no longer using ThreadFrame by the codecs
that don't.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index cf07789d6c..d779804e64 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -72,8 +72,8 @@ static void free_buffers(VP8Context *s) static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref) { int ret; - if ((ret = ff_thread_get_buffer(s->avctx, &f->tf, - ref ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) + if ((ret = ff_thread_get_ext_buffer(s->avctx, &f->tf, + ref ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) return ret; if (!(f->seg_map = av_buffer_allocz(s->mb_width * s->mb_height))) goto fail; @@ -90,7 +90,7 @@ static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref) fail: av_buffer_unref(&f->seg_map); - ff_thread_release_buffer(s->avctx, &f->tf); + ff_thread_release_ext_buffer(s->avctx, &f->tf); return AVERROR(ENOMEM); } @@ -99,7 +99,7 @@ static void vp8_release_frame(VP8Context *s, VP8Frame *f) av_buffer_unref(&f->seg_map); av_buffer_unref(&f->hwaccel_priv_buf); f->hwaccel_picture_private = NULL; - ff_thread_release_buffer(s->avctx, &f->tf); + ff_thread_release_ext_buffer(s->avctx, &f->tf); } #if CONFIG_VP8_DECODER |