aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/proresdec2.c
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2021-11-13 13:38:04 -0600
committerrcombs <rcombs@rcombs.me>2021-11-28 16:40:58 -0600
commitda0179b262a5e30e3c35fa2f522356ade68dc08e (patch)
tree6edaa35d4b9b4d3187fc937197f30ce94da0fca6 /libavcodec/proresdec2.c
parent805bf2ebc94b6a0583fa6ea8cfd4a797c8f20850 (diff)
downloadffmpeg-da0179b262a5e30e3c35fa2f522356ade68dc08e.tar.gz
lavc/proresdec: add videotoolbox hwaccel
Diffstat (limited to 'libavcodec/proresdec2.c')
-rw-r--r--libavcodec/proresdec2.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 5b1d7da693..719194f21e 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -33,6 +33,7 @@
#include "avcodec.h"
#include "get_bits.h"
+#include "hwconfig.h"
#include "idctdsp.h"
#include "internal.h"
#include "profiles.h"
@@ -268,12 +269,15 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
}
if (pix_fmt != ctx->pix_fmt) {
-#define HWACCEL_MAX 0
+#define HWACCEL_MAX (CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL)
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts;
int ret;
ctx->pix_fmt = pix_fmt;
+#if CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL
+ *fmtp++ = AV_PIX_FMT_VIDEOTOOLBOX;
+#endif
*fmtp++ = ctx->pix_fmt;
*fmtp = AV_PIX_FMT_NONE;
@@ -864,4 +868,10 @@ const AVCodec ff_prores_decoder = {
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
.profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
+ .hw_configs = (const AVCodecHWConfigInternal *const []) {
+#if CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL
+ HWACCEL_VIDEOTOOLBOX(prores),
+#endif
+ NULL
+ },
};