Open agners opened 4 years ago
The problem here is that if bytes_per_cpixel = 3
and the pixel format is xRGB or xBGR big endian, then this breaks because VNC has this special "compact pixel" format that discards the unused byte when the depth = 24 bits and bits-per-pixel = 32 bits.
This function is written in such a way that it can be auto-vectorized. If you set --buildtype=release
and with x86_64-simd
in meson_options.txt
set to avx2
, you should get significant performance improvements.
However, keep in mind that it is fairly uncommon for clients to choose raw encoding, so optimising this particular function is probably not very good use of your time as it is definitely not going to be the tightest bottleneck when using tight or zrle encoding.
If you want to have a chat about performance and optimisation, drop by #wayvnc on freenode.
Use memcpy if the pixel format of source and destination is the same. This improves performance of raw encoding significantly in my test case with Weston.