summaryrefslogtreecommitdiffstats
path: root/common/lz_common.h
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-05-18 17:01:29 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-08-24 13:37:51 -0400
commitc0b048ebef41b3a79d42e96c0ecaef65e1bb7599 (patch)
treeeb634cbf7d8a07379490c36a795c6522bea58095 /common/lz_common.h
parent0c1b6de4ad1b3e9d6da50979bb259f0acdc2fd2f (diff)
downloadspice-common-c0b048ebef41b3a79d42e96c0ecaef65e1bb7599.tar.gz
spice-common-c0b048ebef41b3a79d42e96c0ecaef65e1bb7599.tar.xz
spice-common-c0b048ebef41b3a79d42e96c0ecaef65e1bb7599.zip
Add support for A8 images to the LZ routines
This format is needed to add Render support to the X driver, so we need the ability to compress and decompress it.
Diffstat (limited to 'common/lz_common.h')
-rw-r--r--common/lz_common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/lz_common.h b/common/lz_common.h
index 2ec374b..b5ce212 100644
--- a/common/lz_common.h
+++ b/common/lz_common.h
@@ -44,7 +44,8 @@ typedef enum {
LZ_IMAGE_TYPE_RGB24,
LZ_IMAGE_TYPE_RGB32,
LZ_IMAGE_TYPE_RGBA,
- LZ_IMAGE_TYPE_XXXA
+ LZ_IMAGE_TYPE_XXXA,
+ LZ_IMAGE_TYPE_A8
} LzImageType;
#define LZ_IMAGE_TYPE_MASK 0x0f
@@ -54,7 +55,7 @@ typedef enum {
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, 4};
+static const int RGB_BYTES_PER_PIXEL[] = {0, 1, 1, 1, 1, 1, 2, 3, 4, 4, 4, 1};
#define LZ_MAGIC (*(uint32_t *)"LZ ")