summaryrefslogtreecommitdiff
path: root/libavcodec/cuvid.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2016-09-04 09:47:28 -0700
committerTimo Rothenpieler <timo@rothenpieler.org>2016-09-06 21:35:42 +0200
commit1891dfe0130991ee138d01f2877678de717b9e23 (patch)
tree427bcca260c8935ba0acc71ab4fbb12492844493 /libavcodec/cuvid.c
parenteed7e08646e5f7452354e4842d35768d9268ae6b (diff)
cuvid: Add hwaccels and decoders for remaining supported formats
cuvid/nvdecode also supports mpeg1, mpeg2, h.263/mpeg4-asp and mjpeg. It should, in theory, also support wmv3 via the vc1 support, given that vdpau supports this. However, it failed to play wmv3 samples which vdpau played correctly, so I'm not sure what to make of it. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/cuvid.c')
-rw-r--r--libavcodec/cuvid.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c
index 1da0e87f76..7e03e30ccf 100644
--- a/libavcodec/cuvid.c
+++ b/libavcodec/cuvid.c
@@ -557,6 +557,11 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
cuparseinfo.pExtVideoInfo = &cuparse_ext;
switch (avctx->codec->id) {
+#if CONFIG_H263_CUVID_DECODER
+ case AV_CODEC_ID_H263:
+ cuparseinfo.CodecType = cudaVideoCodec_MPEG4;
+ break;
+#endif
#if CONFIG_H264_CUVID_DECODER
case AV_CODEC_ID_H264:
cuparseinfo.CodecType = cudaVideoCodec_H264;
@@ -567,6 +572,26 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
cuparseinfo.CodecType = cudaVideoCodec_HEVC;
break;
#endif
+#if CONFIG_MJPEG_CUVID_DECODER
+ case AV_CODEC_ID_MJPEG:
+ cuparseinfo.CodecType = cudaVideoCodec_JPEG;
+ break;
+#endif
+#if CONFIG_MPEG1_CUVID_DECODER
+ case AV_CODEC_ID_MPEG1VIDEO:
+ cuparseinfo.CodecType = cudaVideoCodec_MPEG1;
+ break;
+#endif
+#if CONFIG_MPEG2_CUVID_DECODER
+ case AV_CODEC_ID_MPEG2VIDEO:
+ cuparseinfo.CodecType = cudaVideoCodec_MPEG2;
+ break;
+#endif
+#if CONFIG_MPEG4_CUVID_DECODER
+ case AV_CODEC_ID_MPEG4:
+ cuparseinfo.CodecType = cudaVideoCodec_MPEG4;
+ break;
+#endif
#if CONFIG_VP8_CUVID_DECODER
case AV_CODEC_ID_VP8:
cuparseinfo.CodecType = cudaVideoCodec_VP8;
@@ -681,10 +706,30 @@ error:
DEFINE_CUVID_CODEC(hevc, HEVC)
#endif
+#if CONFIG_H263_CUVID_DECODER
+DEFINE_CUVID_CODEC(h263, H263)
+#endif
+
#if CONFIG_H264_CUVID_DECODER
DEFINE_CUVID_CODEC(h264, H264)
#endif
+#if CONFIG_MJPEG_CUVID_DECODER
+DEFINE_CUVID_CODEC(mjpeg, MJPEG)
+#endif
+
+#if CONFIG_MPEG1_CUVID_DECODER
+DEFINE_CUVID_CODEC(mpeg1, MPEG1VIDEO)
+#endif
+
+#if CONFIG_MPEG2_CUVID_DECODER
+DEFINE_CUVID_CODEC(mpeg2, MPEG2VIDEO)
+#endif
+
+#if CONFIG_MPEG4_CUVID_DECODER
+DEFINE_CUVID_CODEC(mpeg4, MPEG4)
+#endif
+
#if CONFIG_VP8_CUVID_DECODER
DEFINE_CUVID_CODEC(vp8, VP8)
#endif