GSoC '19: Adding NVDec Support in VLC
I am a heavy user of VLC media player, and I was a bit disappointed to find out that VLC is unable to utilize my NVIDIA card to its fullest for hardware accelerated video decoding.
VLC supports hwaccel on NVIDIA cards through VDPAU, which is an open source API (even AMD and Intel have some support for it).
Sadly, since NVIDIA introduced their hwaccel encoding API called NVEnc, they stopped loving VDPAU; instead they first update NVDec (their proprietary API formerly known as Cuvid) with support for their latest chipsets and codec profiles.
Many applications like FFmpeg, Gstreamer and mpv already support NVDec, thus my task during this Google Summer of Code was to add NVDec support in VLC as well.
List of commits during GSoC period: https://code.videolan.org/gsoc2019/darkapex/vlc/commits/nvdec
Tasks completed:
- Decoding through NVDec API for H264/HEVC 8-bit videos
- Copy decoded video frames from GPU memory to a CPU VLC
picture_t
for display - Automatic interlacing detection and de-interlacing
Tasks currently working on:
- Support more codecs and profiles like VP8/VP9 and 10/12-bit Hxxx
- Render decoded frames without copying back to CPU using CUDA-OpenGL interop, without breaking screenshots etc.
- Better de-interlacing options (pick and choose deint-mode manually through GUI)