[babl] extensions/gggl{, -lies}.c: reduce errors of table-based conversions



commit ae222ac5a86cafea4aeb018209bfa384fdc97970
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Sat Jul 14 17:07:38 2012 +0200

    extensions/gggl{,-lies}.c: reduce errors of table-based conversions
    
    centering the sample within the range of floats it represents

 extensions/gggl-lies.c |    2 +-
 extensions/gggl.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/gggl-lies.c b/extensions/gggl-lies.c
index e3c0029..450fd75 100644
--- a/extensions/gggl-lies.c
+++ b/extensions/gggl-lies.c
@@ -92,7 +92,7 @@ table_init (void)
     } u;
     u.f = 0.0;
 
-    u.s[0] = 0.0;
+    u.s[0] = 0x8000;
 
     for (i = 0; i < 1 << 16; i++)
       {
diff --git a/extensions/gggl.c b/extensions/gggl.c
index 57a0d88..c530988 100644
--- a/extensions/gggl.c
+++ b/extensions/gggl.c
@@ -88,7 +88,7 @@ table_init (void)
     } u;
     u.f = 0.0;
 
-    u.s[0] = 0.0;
+    u.s[0] = 0x8000;
 
     for (u.s[1] = 0; u.s[1] < 65535; u.s[1] += 1)
       {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]