summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2017-12-24 13:25:33 +0000
committerFrediano Ziglio <fziglio@redhat.com>2018-05-10 19:50:50 +0100
commit75d9842e7d5a1b0f12b4d784ed41e40ecc6efcbb (patch)
treefe9a9dcc94d81473ebcc61d0e5ae7abca3bd0163 /common
parentb98f19b1681003c6adb096ff71b29ad562db6e3a (diff)
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>
Diffstat (limited to 'common')
-rw-r--r--common/lz_compress_tmpl.c3
1 files changed, 1 insertions, 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)