Skip to content

nvcodec: cuda buffers support

Essentially, this MR rebases the old nvcodec cuda buffers MR (!526 (closed)) from @seungha.yang on top of master, and additionally fixes the issues I found after testing it for a while.

The performance has also been measured and it is about the same as ffmpeg's. It can be tested with the following transcoding pipeline:

gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! h264parse ! nvh264dec ! cudascale ! "video/x-raw(memory:CUDAMemory),width=1280,height=720" ! nvh264enc ! h264parse ! mp4mux ! filesink location=out.mp4

Which should take about the same time to finish as the following ffmpeg command:

ffmpeg -c:v h264_cuvid -resize 1280x720 -i test.mp4 -c:v h264_nvenc -y out.mp4
Edited by Seungha Yang

Merge request reports