[PATCH spice-common 1/3] lz: Move ENCODE_PIXEL for RGB24 and RGB32 to a common place

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The macro for both depth is the same, reuse the definition.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 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)
-- 
2.17.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]