summaryrefslogtreecommitdiff
path: root/src/static_libs/rg_etc
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-05-09 16:58:31 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-05-09 16:58:53 -0700
commit0c4880e99dd047dc92abb0ea6a04febb91908aef (patch)
tree344c45c691bef20ac2d8b388174c757aa431ac7e /src/static_libs/rg_etc
parentd00643fcc4ebe2de3d9abf21edd0a7f55d99972c (diff)
efl: everyone should now rely on Eina MIN/MAX redefinition.
Diffstat (limited to 'src/static_libs/rg_etc')
-rw-r--r--src/static_libs/rg_etc/rg_etc1.c8
-rw-r--r--src/static_libs/rg_etc/rg_etc2.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/src/static_libs/rg_etc/rg_etc1.c b/src/static_libs/rg_etc/rg_etc1.c
index 866316793c..cff0094e03 100644
--- a/src/static_libs/rg_etc/rg_etc1.c
+++ b/src/static_libs/rg_etc/rg_etc1.c
@@ -33,8 +33,12 @@ typedef unsigned int uint;
33typedef unsigned int uint32; 33typedef unsigned int uint32;
34typedef unsigned char DATA8; 34typedef unsigned char DATA8;
35 35
36#define MIN(A, B) ((A < B) ? A : B) 36#ifndef MIN
37#define MAX(A, B) ((A > B) ? A : B) 37# define MIN(A, B) ((A < B) ? A : B)
38#endif
39#ifndef MAX
40# define MAX(A, B) ((A > B) ? A : B)
41#endif
38#define CLAMP(Value, Low, High) ((Value < Low) ? Low : ((Value > High) ? High : Value)) 42#define CLAMP(Value, Low, High) ((Value < Low) ? Low : ((Value > High) ? High : Value))
39#define SQUARE(Value) (Value * Value) 43#define SQUARE(Value) (Value * Value)
40 44
diff --git a/src/static_libs/rg_etc/rg_etc2.c b/src/static_libs/rg_etc/rg_etc2.c
index c0c22ea61a..e8a465fc21 100644
--- a/src/static_libs/rg_etc/rg_etc2.c
+++ b/src/static_libs/rg_etc/rg_etc2.c
@@ -92,7 +92,9 @@ static const int kAlphaModifiers[16][8] = {
92#define CLAMP(a) ({ int _b = (a); (((_b) >= 0) ? (((_b) < 256) ? (_b) : 255) : 0); }) 92#define CLAMP(a) ({ int _b = (a); (((_b) >= 0) ? (((_b) < 256) ? (_b) : 255) : 0); })
93 93
94// Simple min 94// Simple min
95#define MIN(a,b) ({ int _z = (a), _y = (b); ((_z <= _y) ? _z : _y); }) 95#ifndef MIN
96# define MIN(a,b) ({ int _z = (a), _y = (b); ((_z <= _y) ? _z : _y); })
97#endif
96 98
97// Write a BGRA value for output to Evas 99// Write a BGRA value for output to Evas
98#define BGRA(r,g,b,a) ((a << 24) | (r << 16) | (g << 8) | b) 100#define BGRA(r,g,b,a) ((a << 24) | (r << 16) | (g << 8) | b)