diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-05-31 05:31:57 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-05-31 05:31:59 +0200 |
commit | 37e359147930ce22f8cd8d3e462026db95457cd0 (patch) | |
tree | 82349ba7326bb1efe2042ec4a265596d5c77c93d /src | |
parent | add the names of the connector types to their doc (diff) | |
download | libgamma-37e359147930ce22f8cd8d3e462026db95457cd0.tar.gz libgamma-37e359147930ce22f8cd8d3e462026db95457cd0.tar.bz2 libgamma-37e359147930ce22f8cd8d3e462026db95457cd0.tar.xz |
m translate_from_64
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gamma-helper.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gamma-helper.c b/src/gamma-helper.c index 69f81ea..5c538e7 100644 --- a/src/gamma-helper.c +++ b/src/gamma-helper.c @@ -89,14 +89,12 @@ static void translate_from_64(signed depth, size_t n, libgamma_gamma_ramps_any_t { case 16: for (i = 0; i < n; i++) - in[i] >>= (64 - depth - 1), - out.bits16.red[i] = (uint16_t)((in[i] & 1) | (in[i] >> 1)); + out.bits16.red[i] = (uint64_t)(in[i] / 0x0001000100010001ULL); break; case 32: for (i = 0; i < n; i++) - in[i] >>= (64 - depth - 1), - out.bits32.red[i] = (uint32_t)((in[i] & 1) | (in[i] >> 1)); + out.bits32.red[i] = (uint64_t)(in[i] / 0x0000000100000001ULL); break; case 64: |