OSDN Git Service

do not use Lab by default in the test
authorRudolf Polzer <divverent@alientrap.org>
Tue, 12 Jul 2011 10:10:51 +0000 (12:10 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 14 Jul 2011 17:12:20 +0000 (19:12 +0200)
s2tc.cpp
test.sh

index ad3332c..53ac67e 100644 (file)
--- a/s2tc.cpp
+++ b/s2tc.cpp
@@ -581,8 +581,8 @@ inline int color_dist_lab_srgb(const color_t &a, const color_t &b)
        float bL = 116 * cbrtf(bY / Yn) - 16;
        float bA = 500 * (cbrtf(bX / Xn) - cbrtf(bY / Yn));
        float bB = 200 * (cbrtf(bY / Yn) - cbrtf(bZ / Zn));
-       // euclidean distance
-       return 100 * ((aL - bL) * (aL - bL) + (aA - bA) * (aA - bA) + (aB - bB) * (aB - bB));
+       // euclidean distance, but moving weight away from A and B
+       return 1000 * ((aL - bL) * (aL - bL) + (aA - bA) * (aA - bA) + (aB - bB) * (aB - bB));
 }
 
 inline int color_dist_normalmap(const color_t &a, const color_t &b)
diff --git a/test.sh b/test.sh
index 7655e87..d2492ce 100644 (file)
--- a/test.sh
+++ b/test.sh
@@ -15,8 +15,6 @@ html_start()
        echo >&3 "<tr><th>Picture</th>"
        echo >&3 "<th>Original</th>"
        echo >&3 "<th>nvcompress</th>"
-       echo >&3 "<th>rand64-L*a*b*</th>"
-       echo >&3 "<th>norand-L*a*b*</th>"
        echo >&3 "<th>rand64-sRGB</th>"
        echo >&3 "<th>norand-sRGB</th>"
        echo >&3 "<th>rand64-YUV</th>"
@@ -62,16 +60,14 @@ for i in amelia dxtfail base_concrete1a disabled floor_tile3a lift02 panel_ceil1
        nvcompress "$i".tga "$i".dds
        html "$i".dds
 
-       t "$i".tga "$i"-rand64-lab.dds  ./s2tc -c LAB  -r 64
-       t "$i".tga "$i"-nogray-lab.dds  ./s2tc -c LAB  -r 0
        t "$i".tga "$i"-rand64-srgb.dds ./s2tc -c SRGB -r 64
-       t "$i".tga "$i"-nogray-srgb.dds ./s2tc -c SRGB -r 0
+       t "$i".tga "$i"-norand-srgb.dds ./s2tc -c SRGB -r 0
        t "$i".tga "$i"-rand64-yuv.dds  ./s2tc -c YUV  -r 64
-       t "$i".tga "$i"-nogray-yuv.dds  ./s2tc -c YUV  -r 0
+       t "$i".tga "$i"-norand-yuv.dds  ./s2tc -c YUV  -r 0
        t "$i".tga "$i"-rand64.dds      ./s2tc -c RGB  -r 64
        t "$i".tga "$i"-norand.dds      ./s2tc -c RGB  -r 0
        t "$i".tga "$i"-rand64-avg.dds  ./s2tc -c AVG  -r 64
-       t "$i".tga "$i"-nogray-avg.dds  ./s2tc -c AVG  -r 0
+       t "$i".tga "$i"-norand-avg.dds  ./s2tc -c AVG  -r 0
 
        html_rowend
 done