[Spice-devel] [spice-common PATCH] supply missing IS_IMAGE_TYPE_* elements for LZ_IMAGE_TYPE_A8

Yonit Halperin yhalperi at redhat.com
Tue Apr 9 06:50:23 PDT 2013


Ack.

Thanks,
Yonit.
On 04/09/2013 08:02 AM, Laszlo Ersek wrote:
> 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 at redhat.com>
> ---
>   common/lz_common.h |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/lz_common.h b/common/lz_common.h
> index b5ce212..1a2213a 100644
> --- a/common/lz_common.h
> +++ b/common/lz_common.h
> @@ -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};
>
>



More information about the Spice-devel mailing list