mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-12 21:15:38 +00:00
supply missing IS_IMAGE_TYPE_* elements for LZ_IMAGE_TYPE_A8
The IS_IMAGE_TYPE_PLT and IS_IMAGE_TYPE_RGB arrays are supposed to decide
whether each image type is PLT or RGB. Dependent on the result, one of the
PLT_PIXELS_PER_BYTE and RGB_BYTES_PER_PIXEL arrays can be indexed.
Commit c0b048eb introduced the LZ_IMAGE_TYPE_A8 enum constant and grew the
RGB_BYTES_PER_PIXEL array by one element, but it missed to append a zero
to IS_IMAGE_TYPE_PLT, and a one to IS_IMAGE_TYPE_RGB. Do so now.
Related RHBZ: 928973.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
b52948d792
commit
5aa31e753f
@ -52,8 +52,8 @@ typedef enum {
|
||||
#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, 0};
|
||||
static const int IS_IMAGE_TYPE_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
|
||||
static const int IS_IMAGE_TYPE_PLT[] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
|
||||
static const int IS_IMAGE_TYPE_RGB[] = {0, 0, 0, 0, 0, 0, 1, 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, 1};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user