[Spice-devel] [PATCH spice-server 1/3] glz: Move some macros to a common place

Frediano Ziglio fziglio at redhat.com
Tue Jun 19 08:55:24 UTC 2018


The macros for both depth are the same, reuse the definition.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/glz-encode.tmpl.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/server/glz-encode.tmpl.c b/server/glz-encode.tmpl.c
index 4874a94a..8e2dc03e 100644
--- a/server/glz-encode.tmpl.c
+++ b/server/glz-encode.tmpl.c
@@ -89,21 +89,18 @@
 #ifdef LZ_RGB24
 #define PIXEL rgb24_pixel_t
 #define FNAME(name) glz_rgb24_##name
-#define ENCODE_PIXEL(e, pix) {encode(e, (pix).b); encode(e, (pix).g); encode(e, (pix).r);}
-#define MIN_REF_ENCODE_SIZE 2
-#define MAX_REF_ENCODE_SIZE 2
 #endif
 
 #ifdef LZ_RGB32
 #define PIXEL rgb32_pixel_t
 #define FNAME(name) glz_rgb32_##name
-#define ENCODE_PIXEL(e, pix) {encode(e, (pix).b); encode(e, (pix).g); encode(e, (pix).r);}
-#define MIN_REF_ENCODE_SIZE 2
-#define MAX_REF_ENCODE_SIZE 2
 #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 MIN_REF_ENCODE_SIZE 2
+#define MAX_REF_ENCODE_SIZE 2
 #define GET_r(pix) ((pix).r)
 #define GET_g(pix) ((pix).g)
 #define GET_b(pix) ((pix).b)
-- 
2.17.1



More information about the Spice-devel mailing list