summaryrefslogtreecommitdiff
path: root/libavcodec/nvdec.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2020-10-17 18:16:54 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2020-11-11 18:36:09 +0100
commitac5b45abab3815c36c9110f979b547b2189e739d (patch)
treec105af0b35b3650baf8a8021748e8bc6ef6a11fc /libavcodec/nvdec.c
parent72982f8cb5dad6252a14226d28128313eed4a5ff (diff)
avcodec/nvdec: add av1 hwaccel
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org> Co-authored-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/nvdec.c')
-rw-r--r--libavcodec/nvdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index 52a431c54d..48281293ce 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -62,6 +62,9 @@ typedef struct NVDECFramePool {
static int map_avcodec_id(enum AVCodecID id)
{
switch (id) {
+#if CONFIG_AV1_NVDEC_HWACCEL
+ case AV_CODEC_ID_AV1: return cudaVideoCodec_AV1;
+#endif
case AV_CODEC_ID_H264: return cudaVideoCodec_H264;
case AV_CODEC_ID_HEVC: return cudaVideoCodec_HEVC;
case AV_CODEC_ID_MJPEG: return cudaVideoCodec_JPEG;
@@ -258,6 +261,7 @@ int ff_nvdec_decode_uninit(AVCodecContext *avctx)
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
av_freep(&ctx->bitstream);
+ av_freep(&ctx->bitstream_internal);
ctx->bitstream_len = 0;
ctx->bitstream_allocated = 0;