]> git.ipfire.org Git - thirdparty/qemu.git/commit
ui/vnc: fix tight palette pixel encoding for 8/16-bpp formats
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 28 Jan 2025 13:27:25 +0000 (13:27 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 30 May 2025 12:26:28 +0000 (15:26 +0300)
commit9238fd846db22033cd12aca5736a25d69e1a5985
tree4849e4094a0dd717872c0faad89db4150d5dcb74
parent531cbd8e262d3e59059ea07a72d3aa71c9e94573
ui/vnc: fix tight palette pixel encoding for 8/16-bpp formats

When sending a tight rectangle with the palette filter, if the client
format was 8/16bpp, the colours on big endian hosts are not set as
we're sending the wrong bytes. We must first cast the 32-bit colour
to a 16/8-bit value, and then send the result.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit 63d320909220a90647c484263ae5e2f26eb54587)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
ui/vnc-enc-tight.c