Skip to content

Commit 951e804

Browse files
committed
ffmpeg: Switch cuvid to generic hwaccel
With generic hwaccel, it is additionally necessary to specify the output format. If this is not done, we'll end up downloading the frames back and then re-uploading them. For example: ffmpeg -y -hwaccel cuvid -hwaccel_output_format cuda \ -c:v h264_cuvid -i sample.mp4 \ -c:v h264_nvenc -f rawvideo /dev/null
1 parent e53c906 commit 951e804

File tree

4 files changed

+2
-77
lines changed

4 files changed

+2
-77
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ OBJS-ffmpeg-$(CONFIG_LIBMFX) += ffmpeg_qsv.o
3737
ifndef CONFIG_VIDEOTOOLBOX
3838
OBJS-ffmpeg-$(CONFIG_VDA) += ffmpeg_videotoolbox.o
3939
endif
40-
OBJS-ffmpeg-$(CONFIG_CUVID) += ffmpeg_cuvid.o
4140
OBJS-ffmpeg-$(HAVE_DXVA2_LIB) += ffmpeg_dxva2.o
4241
OBJS-ffserver += ffserver_config.o
4342

ffmpeg.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ int dxva2_init(AVCodecContext *s);
665665
int vda_init(AVCodecContext *s);
666666
int videotoolbox_init(AVCodecContext *s);
667667
int qsv_init(AVCodecContext *s);
668-
int cuvid_init(AVCodecContext *s);
669668

670669
HWDevice *hw_device_get_by_name(const char *name);
671670
int hw_device_init_from_string(const char *arg, HWDevice **dev);

ffmpeg_cuvid.c

Lines changed: 0 additions & 73 deletions
This file was deleted.

ffmpeg_opt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ const HWAccel hwaccels[] = {
9191
AV_HWDEVICE_TYPE_VAAPI },
9292
#endif
9393
#if CONFIG_CUVID
94-
{ "cuvid", cuvid_init, HWACCEL_CUVID, AV_PIX_FMT_CUDA,
95-
AV_HWDEVICE_TYPE_NONE },
94+
{ "cuvid", hwaccel_decode_init, HWACCEL_CUVID, AV_PIX_FMT_CUDA,
95+
AV_HWDEVICE_TYPE_CUDA },
9696
#endif
9797
{ 0 },
9898
};

0 commit comments

Comments
 (0)