[Spice-devel] [common PATCH 0/8 v3] Fix colors on BE clients, when using image compression

Lukas Venhoda lvenhoda at redhat.com
Thu Oct 22 08:02:46 PDT 2015


When using image compression on BE client, the color order was wrong.
(BGRA instead of ARGB)

Theese patches try to fix this issue in most of the image compressions.
Only those compressions I could test are changed.

For most of the fixes, new macros for color order were implemented.
Theese macros changed according to the endianness of the machine it runs on.
Original implementation is in QEMU in file qemu-pixman.h

Not all PIXMAN_[a-z] were changed. I don't know what half of them do, nor how to test them.
When I tryed changing them all, it broke my fixes, so I left them as is.
If someone finds a problem with them, I can always patch them later.

---
Changes since v2:
 - Added jpeg compression support
 - Fixed alpha clearing when using x8r8g8b8 colors
 - Fixed typos and imrpoved commit logs

Changes since v1:
 - Added more image compressions (lz, glz, lz4)
 - Fixed some typos in canvas_util.c
 - Cleaned up pixman-utils.h using the new macros
---

Lukas Venhoda (8):
  pixman_utils: Add macros for color byte ordering
  pixman_utils: Use PIXMAN_LE_ constants in spice_bitmap_try_as_pixman()
  ppc: Added supprt for bigendian color byte order
  ppc: Fix colors on ppc when using QUIC
  ppc: Fix colors on ppc when using LZ
  ppc: Fix colors on ppc when using LZ4
  ppc: Fix colors on ppc when using jpeg
  ppc: Fix alpha state checking and clearing on BE machines

 common/canvas_base.c  | 34 ++++++++++++++++++++--------------
 common/canvas_utils.c | 14 ++++++++++++++
 common/pixman_utils.c | 18 +++---------------
 common/pixman_utils.h | 10 ++++++++++
 4 files changed, 47 insertions(+), 29 deletions(-)

--
2.4.3



More information about the Spice-devel mailing list