aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegpicture.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-02-06 07:44:10 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-02-09 17:22:23 +0100
commitf025b8e110b36c1cdb4fb56c4cd57aeca1767b5b (patch)
tree3b668e0c57158154ea4b7bdaa13cbd5ad23221da /libavcodec/mpegpicture.c
parentb3551b6072687539c9e162fcec9e1e42a668ee8c (diff)
downloadffmpeg-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/mpegpicture.c')
-rw-r--r--libavcodec/mpegpicture.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index 27e497c404..be6e6967e0 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -29,6 +29,7 @@
#include "motion_est.h"
#include "mpegpicture.h"
#include "mpegutils.h"
+#include "threadframe.h"
static void av_noinline free_picture_tables(Picture *pic)
{
@@ -130,8 +131,8 @@ static int alloc_frame_buffer(AVCodecContext *avctx, Picture *pic,
pic->f->height = avctx->height + 2 * EDGE_WIDTH;
}
- r = ff_thread_get_buffer(avctx, &pic->tf,
- pic->reference ? AV_GET_BUFFER_FLAG_REF : 0);
+ r = ff_thread_get_ext_buffer(avctx, &pic->tf,
+ pic->reference ? AV_GET_BUFFER_FLAG_REF : 0);
} else {
pic->f->width = avctx->width;
pic->f->height = avctx->height;
@@ -321,7 +322,7 @@ void ff_mpeg_unref_picture(AVCodecContext *avctx, Picture *pic)
if (avctx->codec_id != AV_CODEC_ID_WMV3IMAGE &&
avctx->codec_id != AV_CODEC_ID_VC1IMAGE &&
avctx->codec_id != AV_CODEC_ID_MSS2)
- ff_thread_release_buffer(avctx, &pic->tf);
+ ff_thread_release_ext_buffer(avctx, &pic->tf);
else if (pic->f)
av_frame_unref(pic->f);