5 CXX="g++ -Wall -Wextra -O3"
13 echo >&3 "<html><title>S2TC</title>"
15 <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
16 <script type="text/javascript">
22 me.data("src", me.attr("src"));
23 me.attr("src", me.data("src"));
24 if(refsrc == me.data("src"))
27 refsrc = me.data("src");
33 me.data("src", me.attr("src"));
35 me.attr("src", refsrc);
41 me.attr("src", me.data("src"));
45 $('img').click(clickfunc);
46 $('img').mouseenter(enterfunc);
47 $('img').mouseleave(leavefunc);
51 echo >&3 "<body onLoad=\"run()\"><h1>S2TC</h1>"
53 echo >&3 "<tr><th>Picture</th>"
54 echo >&3 "<th>Original</th>"
55 echo >&3 "<th>nvcompress</th>"
56 echo >&3 "<th>nvcompress (S2TC)</th>"
57 echo >&3 "<th>rand64-sRGB-mixed</th>"
58 echo >&3 "<th>norand-sRGB-mixed</th>"
59 echo >&3 "<th>faster-sRGB-mixed</th>"
60 echo >&3 "<th>rand64-wavg</th>"
61 echo >&3 "<th>norand-wavg</th>"
62 echo >&3 "<th>faster-wavg</th>"
63 echo >&3 "<th>rand64-avg</th>"
64 echo >&3 "<th>norand-avg</th>"
65 echo >&3 "<th>faster-avg</th>"
70 echo >&3 "<tr><th>$1</th>"
74 convert "$1" -crop 256x256+192+128 "html/$1.png"
75 echo >&3 "<td><img src=\"$1.png\" alt=\"$1\"></td>"
79 ./s2tc_decompress < "$1" | convert TGA:- -crop 256x256+192+128 "html/$1-s2tc.png"
80 echo >&3 "<td><img src=\"$1-s2tc.png\" alt=\"$1\"></td>"
88 echo >&3 "</table></body></html>"
95 time "$@" < "$in" > "$out"
100 for i in dxtfail base_concrete1a disabled floor_tile3a lift02 panel_ceil1a sunset amelia rms noise noise_solid supernova ishihara augenkrebs; do
105 nvcompress "$i".tga "$i".dds
109 t "$i".tga "$i"-rand64-mrgb.dds ./s2tc -c SRGB_MIXED -r 64
110 t "$i".tga "$i"-norand-mrgb.dds ./s2tc -c SRGB_MIXED -r 0
111 t "$i".tga "$i"-faster-mrgb.dds ./s2tc -c SRGB_MIXED -r -1
112 t "$i".tga "$i"-rand64-wavg.dds ./s2tc -c WAVG -r 64
113 t "$i".tga "$i"-norand-wavg.dds ./s2tc -c WAVG -r 0
114 t "$i".tga "$i"-faster-wavg.dds ./s2tc -c WAVG -r -1
115 t "$i".tga "$i"-rand64-avg.dds ./s2tc -c AVG -r 64
116 t "$i".tga "$i"-norand-avg.dds ./s2tc -c AVG -r 0
117 t "$i".tga "$i"-faster-avg.dds ./s2tc -c AVG -r -1