diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2010-06-20 17:18:56 +0300 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:44 +0100 |
commit | 9c906e0c2f6598a460c7335d0c53770e6aac1fbc (patch) | |
tree | 111d4002004fc513083c77eed12fa4dc393a4b81 /common/lz_common.h | |
parent | e48d14df78319c69f03563a2c009bb4a6a857873 (diff) | |
download | spice-common-9c906e0c2f6598a460c7335d0c53770e6aac1fbc.tar.gz spice-common-9c906e0c2f6598a460c7335d0c53770e6aac1fbc.tar.xz spice-common-9c906e0c2f6598a460c7335d0c53770e6aac1fbc.zip |
Lossy compression of RGBA images (on WAN connection)
The RGB channels are compressed using JPEG.
The alpha channel is compressed using LZ.
Diffstat (limited to 'common/lz_common.h')
-rw-r--r-- | common/lz_common.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/lz_common.h b/common/lz_common.h index d5019fd..34276af 100644 --- a/common/lz_common.h +++ b/common/lz_common.h @@ -39,17 +39,18 @@ typedef enum { LZ_IMAGE_TYPE_RGB16, LZ_IMAGE_TYPE_RGB24, LZ_IMAGE_TYPE_RGB32, - LZ_IMAGE_TYPE_RGBA + LZ_IMAGE_TYPE_RGBA, + LZ_IMAGE_TYPE_XXXA } LzImageType; #define LZ_IMAGE_TYPE_MASK 0x0f #define LZ_IMAGE_TYPE_LOG 4 // number of bits required for coding the image type /* access to the arrays is based on the image types */ -static const int IS_IMAGE_TYPE_PLT[] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0}; -static const int IS_IMAGE_TYPE_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1}; +static const int IS_IMAGE_TYPE_PLT[] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}; +static const int IS_IMAGE_TYPE_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1}; static const int PLT_PIXELS_PER_BYTE[] = {0, 8, 8, 2, 2, 1}; -static const int RGB_BYTES_PER_PIXEL[] = {0, 1, 1, 1, 1, 1, 2, 3, 4, 4}; +static const int RGB_BYTES_PER_PIXEL[] = {0, 1, 1, 1, 1, 1, 2, 3, 4, 4, 4}; #define LZ_MAGIC (*(uint32_t *)"LZ ") |