Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2017-11-16 18:38:10 +0300
committerPhilip Langdale <philipl@overt.org>2017-11-20 18:03:26 +0300
commit8bca292c3045a7f372299f71c8d88b541fe2a816 (patch)
tree3b3367c83d6476c1f8d917988fbec92c5fb18bca /libavcodec/nvdec_mpeg12.c
parent4c7b023d56e09a78a587d036db1b64bf7c493b3d (diff)
avcodec: Implement mpeg1 nvdec hwaccel
Once I remembered that there's a separate decoder type for mpeg1, even though params struct is shared with mpeg2, everything worked.
Diffstat (limited to 'libavcodec/nvdec_mpeg12.c')
-rw-r--r--libavcodec/nvdec_mpeg12.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libavcodec/nvdec_mpeg12.c b/libavcodec/nvdec_mpeg12.c
index db9cebeddd..e29d085a79 100644
--- a/libavcodec/nvdec_mpeg12.c
+++ b/libavcodec/nvdec_mpeg12.c
@@ -1,5 +1,5 @@
/*
- * MPEG-2 HW decode acceleration through NVDEC
+ * MPEG-1/2 HW decode acceleration through NVDEC
*
* Copyright (c) 2017 Philip Langdale
*
@@ -105,3 +105,19 @@ AVHWAccel ff_mpeg2_nvdec_hwaccel = {
.priv_data_size = sizeof(NVDECContext),
};
#endif
+
+#if CONFIG_MPEG1_NVDEC_HWACCEL
+AVHWAccel ff_mpeg1_nvdec_hwaccel = {
+ .name = "mpeg1_nvdec",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_MPEG1VIDEO,
+ .pix_fmt = AV_PIX_FMT_CUDA,
+ .start_frame = nvdec_mpeg12_start_frame,
+ .end_frame = ff_nvdec_simple_end_frame,
+ .decode_slice = ff_nvdec_simple_decode_slice,
+ .frame_params = nvdec_mpeg12_frame_params,
+ .init = ff_nvdec_decode_init,
+ .uninit = ff_nvdec_decode_uninit,
+ .priv_data_size = sizeof(NVDECContext),
+};
+#endif