diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-08-02 21:15:22 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-08-02 21:15:22 +0000 |
commit | b4cb493135dd80c2fef7add77e724a2524b76096 (patch) | |
tree | e5943dc837975df8afd2b72e342f4bcccd5201f2 /apps/plugins/lib/gray_core.c | |
parent | fd9bd310a25ca57473381bdc3a350d188e18da56 (diff) |
Proper rounding...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10420 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/gray_core.c')
-rw-r--r-- | apps/plugins/lib/gray_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/lib/gray_core.c b/apps/plugins/lib/gray_core.c index 4dbe7d4229..2b4d2c5eb7 100644 --- a/apps/plugins/lib/gray_core.c +++ b/apps/plugins/lib/gray_core.c @@ -438,7 +438,7 @@ int gray_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, { for (i = 0; i < 256; i++) { - data = exp_s16p16((gamma * log_s16p16(i * 257 + 1)) >> 8); + data = exp_s16p16((gamma * log_s16p16(i * 257 + 1)) >> 8) + 128; data = (data - (data >> 8)) >> 8; /* approx. data /= 257 */ data = MULU16(depth, lcdlinear[data]) + 127; _gray_info.idxtable[i] = (data + (data >> 8)) >> 8; |