[Spice-devel] [PATCH spice-common 1/3] lz: Move ENCODE_PIXEL for RGB24 and RGB32 to a common place
Jonathon Jongsma
jjongsma at redhat.com
Thu May 10 16:36:27 UTC 2018
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Wed, 2018-05-09 at 14:10 +0100, Frediano Ziglio wrote:
> The macro for both depth is the same, reuse the definition.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> common/lz_compress_tmpl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c
> index 1bb5c75..69e69a6 100644
> --- a/common/lz_compress_tmpl.c
> +++ b/common/lz_compress_tmpl.c
> @@ -125,17 +125,16 @@
> #ifdef LZ_RGB24
> #define PIXEL rgb24_pixel_t
> #define FNAME(name) lz_rgb24_##name
> -#define ENCODE_PIXEL(e, pix) {encode(e, (pix).b); encode(e,
> (pix).g); encode(e, (pix).r);}
> #endif
>
> #ifdef LZ_RGB32
> #define PIXEL rgb32_pixel_t
> #define FNAME(name) lz_rgb32_##name
> -#define ENCODE_PIXEL(e, pix) {encode(e, (pix).b); encode(e,
> (pix).g); encode(e, (pix).r);}
> #endif
>
>
> #if defined(LZ_RGB24) || defined(LZ_RGB32)
> +#define ENCODE_PIXEL(e, pix) {encode(e, (pix).b); encode(e,
> (pix).g); encode(e, (pix).r);}
> #define GET_r(pix) ((pix).r)
> #define GET_g(pix) ((pix).g)
> #define GET_b(pix) ((pix).b)
More information about the Spice-devel
mailing list