Xpra: Ticket #1046: nvenc v6 support

https://developer.nvidia.com/nvidia-video-codec-sdk, new features that might be of interest to us:

HEVC hardware encoding would be worth testing.



Tue, 08 Dec 2015 08:16:21 GMT - Antoine Martin: status, description changed


Tue, 22 Dec 2015 17:42:15 GMT - Antoine Martin:

Initial support added in r11471.

Summary of the most noteworthy changes (excluding various indentation changes and typos we can ignore, new constants, etc):

It looks like a GTX 980 or newer is required for testing HEVC..


Tue, 02 Feb 2016 22:30:39 GMT - Antoine Martin:

Improvements and fixes in r11815, r11816, r11817 (most of which should be backported)

Support code added in r11818 so we can at least try to probe HEVC... (still failing). Will need to compare API parameters between the C client and the Cython version. This works:

./NvEncoder -codec 1 -i /opt/nvenc4/Samples/YUV/1080p/HeavyHandIdiot.3sec.yuv -size 1920 1080 -o test.hevc

But our selftests do not.


Tue, 09 Feb 2016 00:25:09 GMT - Antoine Martin:

Instrumenting the C and Cython versions to dump the contents of the NV_ENC_INITIALIZE_PARAMS structure, I can see that most of the structure is empty (as expected), the differences are:


Tue, 09 Feb 2016 22:08:09 GMT - Antoine Martin: attachment set

debug init structure and force default preset


Tue, 09 Feb 2016 22:10:54 GMT - Antoine Martin:

With the patch above applied, the structure is closer to the C version:

060005f088dc0c7922457b4d9425bda9975f760305b7dfb2bd4e494c9b5f24a7
77d3e58720000000200000002000000020000000010000001e00000000000000
01000000000000000000000000000000000000000000000070054a3d67550000
2000000020000000000000000000000000000000000000000000000000000000

Tue, 09 Feb 2016 23:09:38 GMT - Antoine Martin: status changed; resolution set

HEVC works as of r11896. The trick was to discover that HEVC has an undocumented minimum size of 72x72.. The tests need improving so we can feed better test input into the encoder, but with the (crappy) existing tests it looks like HEVC is marginally slower than H264 (~15%) at the same resolution and settings, but compresses at lot better. (TBC)

The big disappointment is that it does not perform any better at higher resolutions (even with the low-latency profiles), and it has the same limits as h264: 4096x4096 maximum size. (this is currently hardcoded in our codec, we should be probing it instead: FIXME added in r11897) Let's hope that other implementations deliver better performance. (#451?). This will do for now.

Test related fix in r11895. (could be backported - may apply to libvpx testing)


Sat, 23 Jan 2021 05:13:25 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1046