[FFmpeg-devel] [PATCH 32/42] avcodec/vp9: Reduce wait times
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Sep 19 22:57:24 EEST 2023
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/vp9.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 79c4ae0205..87c507bb36 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -1564,14 +1564,15 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
av_log(avctx, AV_LOG_ERROR, "Requested reference %d not available\n", ref);
return AVERROR_INVALIDDATA;
}
+ for (int i = 0; i < 8; i++)
+ ff_thread_progress_replace(avctx, &s->next_refs[i], &s->s.refs[i]);
+ ff_thread_finish_setup(avctx);
ff_thread_progress_await(&s->s.refs[ref], INT_MAX);
if ((ret = av_frame_ref(frame, s->s.refs[ref].f)) < 0)
return ret;
frame->pts = pkt->pts;
frame->pkt_dts = pkt->dts;
- for (int i = 0; i < 8; i++)
- ff_thread_progress_replace(avctx, &s->next_refs[i], &s->s.refs[i]);
*got_frame = 1;
return pkt->size;
}
--
2.34.1
More information about the ffmpeg-devel
mailing list