[FFmpeg-cvslog] lavc/speedhqdec: Add AV_CODEC_CAP_FRAME_THREADS
Tomas Härdin
git at videolan.org
Mon May 13 09:56:12 EEST 2024
ffmpeg | branch: master | Tomas Härdin <git at haerdin.se> | Wed May 8 14:17:18 2024 +0200| [5b32685d77c67880e8c630844edbdf89f9f9b387] | committer: Tomas Härdin
lavc/speedhqdec: Add AV_CODEC_CAP_FRAME_THREADS
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5b32685d77c67880e8c630844edbdf89f9f9b387
---
libavcodec/speedhqdec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c
index d3605b0649..e54e25cb25 100644
--- a/libavcodec/speedhqdec.c
+++ b/libavcodec/speedhqdec.c
@@ -40,6 +40,7 @@
#include "mpeg12data.h"
#include "mpeg12vlc.h"
#include "speedhq.h"
+#include "thread.h"
#define MAX_INDEX (64 - 1)
@@ -433,7 +434,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame,
avctx->coded_width = FFALIGN(avctx->width, 16);
avctx->coded_height = FFALIGN(avctx->height, 16);
- if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
+ if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) {
return ret;
}
frame->flags |= AV_FRAME_FLAG_KEY;
@@ -649,5 +650,5 @@ const FFCodec ff_speedhq_decoder = {
.priv_data_size = sizeof(SHQContext),
.init = speedhq_decode_init,
FF_CODEC_DECODE_CB(speedhq_decode_frame),
- .p.capabilities = AV_CODEC_CAP_DR1,
+ .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
};
More information about the ffmpeg-cvslog
mailing list