mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2025-12-26 14:18:36 +00:00
lz: Move ENCODE_PIXEL for RGB24 and RGB32 to a common place
The macro for both depth is the same, reuse the definition. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
b98f19b168
commit
75d9842e7d
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user