aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpv_reconstruct_mb_template.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-16 01:21:55 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-12 11:53:49 +0200
commit45cf0541cf4b3ec89cd9c8c8919c0650852f30ec (patch)
tree6312f996968e01b3bacbbb57c0a7ab96319ee233 /libavcodec/mpv_reconstruct_mb_template.c
parent5475000942c812bf9c5eb01f84d84822e7e0a0c0 (diff)
downloadffmpeg-45cf0541cf4b3ec89cd9c8c8919c0650852f30ec.tar.gz
avcodec/mpegpicture: Use ThreadProgress instead of ThreadFrame API
Given that MPVPictures are already directly shared between threads in case of frame-threaded decoding, one can simply use it to pass decoding progress information between threads. This allows to avoid one level of indirection; it also means avoids allocations (of the ThreadFrameProgress structure) in case of frame-threading and indeed makes ff_thread_release_ext_buffer() decoder-only (actually, H.264-decoder-only). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpv_reconstruct_mb_template.c')
-rw-r--r--libavcodec/mpv_reconstruct_mb_template.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpv_reconstruct_mb_template.c b/libavcodec/mpv_reconstruct_mb_template.c
index 549c55ffad..9aacf380a1 100644
--- a/libavcodec/mpv_reconstruct_mb_template.c
+++ b/libavcodec/mpv_reconstruct_mb_template.c
@@ -124,12 +124,12 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64],
if (HAVE_THREADS && is_mpeg12 != DEFINITELY_MPEG12 &&
s->avctx->active_thread_type & FF_THREAD_FRAME) {
if (s->mv_dir & MV_DIR_FORWARD) {
- ff_thread_await_progress(&s->last_pic.ptr->tf,
- lowest_referenced_row(s, 0), 0);
+ ff_thread_progress_await(&s->last_pic.ptr->progress,
+ lowest_referenced_row(s, 0));
}
if (s->mv_dir & MV_DIR_BACKWARD) {
- ff_thread_await_progress(&s->next_pic.ptr->tf,
- lowest_referenced_row(s, 1), 0);
+ ff_thread_progress_await(&s->next_pic.ptr->progress,
+ lowest_referenced_row(s, 1));
}
}