]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
add to nvdec: vp8, vp9, mpeg2
authorUkn Unknown <4031821+uknunknown@users.noreply.github.com>
Mon, 3 Nov 2025 23:57:37 +0000 (15:57 -0800)
committerFlole <Flole998@users.noreply.github.com>
Fri, 14 Nov 2025 15:10:05 +0000 (16:10 +0100)
- add to nvdec: vp8, vp9, mjpeg, mpeg1, mpeg2, mpeg4
- removed mjpeg_vaapi because is code cannot be reached

Makefile.ffmpeg
src/transcoding/transcode/stream.c

index 5c4c7135cf085b898b7059d22777ff3d1bf20b01..e4cbcb0bf29e1ebb658ccd7faf5abb49f1c56829 100644 (file)
@@ -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
 
index b2b5d20de21f73520a6b562b44b7516590b51dd2..35f69004c35cb62290046eb3a68adbff719d647d 100644 (file)
@@ -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