diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-05 09:14:17 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-05 09:14:17 +0100 |
commit | 6c518351ef1a7fc144d3689165fbe582d1ee72fc (patch) | |
tree | daf5f57999a889a14506de4af7136d025476d338 /src/colorramp.h | |
parent | Update my e-mail address (diff) | |
parent | Add coopgamma backend (diff) | |
download | redshift-ng-6c518351ef1a7fc144d3689165fbe582d1ee72fc.tar.gz redshift-ng-6c518351ef1a7fc144d3689165fbe582d1ee72fc.tar.bz2 redshift-ng-6c518351ef1a7fc144d3689165fbe582d1ee72fc.tar.xz |
Merge branch 'coopgamma' of https://github.com/maandree/redshift
Diffstat (limited to 'src/colorramp.h')
-rw-r--r-- | src/colorramp.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/colorramp.h b/src/colorramp.h index 438c563..8802844 100644 --- a/src/colorramp.h +++ b/src/colorramp.h @@ -24,9 +24,19 @@ #include "redshift.h" -void colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b, - int size, const color_setting_t *setting); -void colorramp_fill_float(float *gamma_r, float *gamma_g, float *gamma_b, - int size, const color_setting_t *setting); +#define LIST_RAMPS_STOP_VALUE_TYPES\ + X(u8, uint8_t, UINT8_MAX + 1ULL, UINT8_MAX, 8)\ + X(u16, uint16_t, UINT16_MAX + 1ULL, UINT16_MAX, 16)\ + X(u32, uint32_t, UINT32_MAX + 1ULL, UINT32_MAX, 32)\ + X(u64, uint64_t, UINT64_MAX, UINT64_MAX, 64)\ + X(float, float, 1, 1, -1)\ + X(double, double, 1, 1, -2) + +#define X(SUFFIX, TYPE, MAX, TRUE_MAX, DEPTH)\ + void colorramp_fill_##SUFFIX(TYPE *gamma_r, TYPE *gamma_g, TYPE *gamma_b,\ + size_t size_r, size_t size_g, size_t size_b,\ + const color_setting_t *setting); +LIST_RAMPS_STOP_VALUE_TYPES +#undef X #endif /* ! REDSHIFT_COLORRAMP_H */ |