From: Ukn Unknown <4031821+uknunknown@users.noreply.github.com> Date: Mon, 3 Nov 2025 23:57:37 +0000 (-0800) Subject: add to nvdec: vp8, vp9, mpeg2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8640725b7dd69ac214c33442830bface4bc6fce7;p=thirdparty%2Ftvheadend.git add to nvdec: vp8, vp9, mpeg2 - add to nvdec: vp8, vp9, mjpeg, mpeg1, mpeg2, mpeg4 - removed mjpeg_vaapi because is code cannot be reached --- diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg index 5c4c7135c..e4cbcb0bf 100644 --- a/Makefile.ffmpeg +++ b/Makefile.ffmpeg @@ -569,7 +569,7 @@ ifeq (yes,$(CONFIG_NVENC)) ## YOU MUST INSTALL CUDA from NVIDIA for "libnpp" EXTLIBS += nvenc cuvid libnpp ENCODERS += h264_nvenc hevc_nvenc -DECODERS += h264_cuvid hevc_cuvid +DECODERS += h264_cuvid hevc_cuvid vp8_cuvid vp9_cuvid mpeg2_cuvid HWACCELS += h264_nvdec hevc_nvdec vp8_nvdec vp9_nvdec mjpeg_nvdec mpeg1_nvdec mpeg2_nvdec mpeg4_nvdec ECFLAGS += -I/usr/local/cuda/include diff --git a/src/transcoding/transcode/stream.c b/src/transcoding/transcode/stream.c index b2b5d20de..35f69004c 100644 --- a/src/transcoding/transcode/stream.c +++ b/src/transcoding/transcode/stream.c @@ -88,10 +88,16 @@ tvh_stream_setup(TVHStream *self, TVHCodecProfile *profile, tvh_ssc_t *ssc) hwaccel && ((hwaccel_details == HWACCEL_AUTO && strstr(profile->codec_name, "nvenc")) || hwaccel_details == HWACCEL_PRIORITIZE_NVDEC)) { // https://developer.nvidia.com/video-codec-sdk - if (icodec_id == AV_CODEC_ID_H264) { + if (icodec_id == AV_CODEC_ID_MPEG2VIDEO) { + icodec = avcodec_find_decoder_by_name("mpeg2_cuvid"); + } else if (icodec_id == AV_CODEC_ID_H264) { icodec = avcodec_find_decoder_by_name("h264_cuvid"); } else if (icodec_id == AV_CODEC_ID_HEVC) { icodec = avcodec_find_decoder_by_name("hevc_cuvid"); + } else if (icodec_id == AV_CODEC_ID_VP9) { + icodec = avcodec_find_decoder_by_name("vp9_cuvid"); + } else if (icodec_id == AV_CODEC_ID_VP8) { + icodec = avcodec_find_decoder_by_name("vp8_cuvid"); } } #endif @@ -110,8 +116,6 @@ tvh_stream_setup(TVHStream *self, TVHCodecProfile *profile, tvh_ssc_t *ssc) icodec = avcodec_find_decoder_by_name("vp9_vaapi"); } else if (icodec_id == AV_CODEC_ID_VP8) { icodec = avcodec_find_decoder_by_name("vp8_vaapi"); - }else if (icodec_id == AV_CODEC_ID_MJPEG) { - icodec = avcodec_find_decoder_by_name("mjpeg_vaapi"); } } #endif