summaryrefslogtreecommitdiff
path: root/libavcodec/nvdec.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2017-11-16 07:35:17 -0800
committerPhilip Langdale <philipl@overt.org>2017-11-18 08:13:50 -0800
commit7c9f739d864c0ed8f1b433d6a7d9f674edda9cf5 (patch)
tree46a05dceb3641504c0a31cdd3ab687415bcbb1d8 /libavcodec/nvdec.c
parent5a0f6b099f3e8fcb95a80e3ffe52b3bf369efe24 (diff)
avcodec: Implement mpeg2 nvdec hwaccel
This is mostly straight-forward. The weird part is that it should just work for mpeg1, but I see corruption in my test cases, so I'm going to try and fix that separately.
Diffstat (limited to 'libavcodec/nvdec.c')
-rw-r--r--libavcodec/nvdec.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index 20d7c3db27..3d62840e9f 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -52,11 +52,12 @@ typedef struct NVDECFramePool {
static int map_avcodec_id(enum AVCodecID id)
{
switch (id) {
- case AV_CODEC_ID_H264: return cudaVideoCodec_H264;
- case AV_CODEC_ID_HEVC: return cudaVideoCodec_HEVC;
- case AV_CODEC_ID_VC1: return cudaVideoCodec_VC1;
- case AV_CODEC_ID_VP9: return cudaVideoCodec_VP9;
- case AV_CODEC_ID_WMV3: return cudaVideoCodec_VC1;
+ case AV_CODEC_ID_H264: return cudaVideoCodec_H264;
+ case AV_CODEC_ID_HEVC: return cudaVideoCodec_HEVC;
+ case AV_CODEC_ID_MPEG2VIDEO: return cudaVideoCodec_MPEG2;
+ case AV_CODEC_ID_VC1: return cudaVideoCodec_VC1;
+ case AV_CODEC_ID_VP9: return cudaVideoCodec_VP9;
+ case AV_CODEC_ID_WMV3: return cudaVideoCodec_VC1;
}
return -1;
}