10 ./configure --prefix="`pwd`/tests"
17 echo >&3 "<html><title>S2TC</title>"
19 <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
20 <script type="text/javascript">
26 me.data("src", me.attr("src"));
27 me.attr("src", me.data("src"));
28 if(refsrc == me.data("src"))
31 refsrc = me.data("src");
37 me.data("src", me.attr("src"));
39 me.attr("src", refsrc);
45 me.attr("src", me.data("src"));
49 $('img').click(clickfunc);
50 $('img').mouseenter(enterfunc);
51 $('img').mouseleave(leavefunc);
55 echo >&3 "<body onLoad=\"run()\"><h1>S2TC</h1>"
57 echo >&3 "<tr><th>Picture</th>"
58 echo >&3 "<th>Original</th>"
60 if $use_compressonator; then
61 echo >&3 "<th>Compressonator</th>"
63 if $use_nvcompress; then
64 echo >&3 "<th>nvcompress</th>"
66 echo >&3 "<th>rand32-sRGB-mixed</th>"
67 echo >&3 "<th>rand32-wavg</th>"
68 echo >&3 "<th>rand32-avg</th>"
70 if $use_libtxc_dxtn; then
71 echo >&3 "<th>libtxc_dxtn</th>"
73 echo >&3 "<th>norand-wavg</th>"
74 echo >&3 "<th>faster-wavg</th>"
80 echo >&3 "<tr><th>$1</th>"
87 convert "$1" -crop 256x256+192+128 "html/$1.png"
88 echo >&3 "<td><img src=\"$1.png\" alt=\"$1\" title=\"$1$deltatime\"></td>"
89 eval "prevdeltatime=\$deltatime_$col"
90 prevdeltatime=`echo "($prevdeltatime-0)+$deltatime_raw" | bc`
91 eval "deltatime_$col=\$prevdeltatime"
96 bin/s2tc_decompress < "$1" | convert TGA:- -crop 256x256+192+128 "html/$1-s2tc.png"
97 echo >&3 "<td><img src=\"$1-s2tc.png\" alt=\"$1\" title=\"$1$deltatime\"></td>"
98 eval "prevdeltatime=\$deltatime_$col"
99 prevdeltatime=`echo "($prevdeltatime-0)+$deltatime_raw" | bc`
100 eval "deltatime_$col=\$prevdeltatime"
109 echo >&3 "<tr><th>Total runtime</th><td>(original)</td>"
112 eval "prevdeltatime=\$deltatime_$col"
113 [ -n "$prevdeltatime" ] || break
114 deltatime=`echo "scale=3; $prevdeltatime / 1000000000" | bc -l`
115 echo >&3 "<td>$deltatime seconds</td>"
118 echo >&3 "</table></body></html>"
126 deltatime_raw=`echo "$t1 - $t0" | bc`
127 deltatime=`echo "scale=3; $deltatime_raw / 1000000000" | bc -l`
128 deltatime=" ($deltatime seconds)"
135 timing "$@" < "$in" > "$out"
139 if which nvcompress >/dev/null 2>&1; then
144 if which wine >/dev/null 2>&1 && [ -f "$HOME/.wine/drive_c/Program Files (x86)/AMD/The Compressonator 1.50/TheCompressonator.exe" ]; then
145 use_compressonator=true
147 use_compressonator=false
149 if [ -f /usr/lib/libtxc_dxtn.so ]; then
152 use_libtxc_dxtn=false
156 for i in dxtfail fract001 base_concrete1a disabled floor_tile3a lift02 panel_ceil1a sunset amelia rms noise noise_solid supernova ishihara augenkrebs; do
161 if $use_compressonator; then
162 timing wine "c:/Program Files (x86)/AMD/The Compressonator 1.50/TheCompressonator.exe" -convert -overwrite -mipmaps "$i".tga "$i"-amdcompress.dds -codec DXTC.dll +fourCC DXT1 -mipper BoxFilter.dll
163 html "$i"-amdcompress.dds
166 if $use_nvcompress; then
167 timing nvcompress "$i".tga "$i"-nvcompress.dds
168 html "$i"-nvcompress.dds
171 S2TC_COLORDIST_MODE=SRGB_MIXED S2TC_RANDOM_COLORS=32 S2TC_REFINE_COLORS=CHECK t "$i".tga "$i"-rand32-mrgb-r.dds bin/s2tc
172 S2TC_COLORDIST_MODE=WAVG S2TC_RANDOM_COLORS=32 S2TC_REFINE_COLORS=CHECK t "$i".tga "$i"-rand32-wavg-r.dds bin/s2tc
173 S2TC_COLORDIST_MODE=AVG S2TC_RANDOM_COLORS=32 S2TC_REFINE_COLORS=CHECK t "$i".tga "$i"-rand32-avg-r.dds bin/s2tc
174 if $use_libtxc_dxtn; then
175 LD_PRELOAD=/usr/lib/libtxc_dxtn.so t "$i".tga "$i"-libtxc_dxtn.dds bin/s2tc
178 S2TC_COLORDIST_MODE=WAVG S2TC_RANDOM_COLORS=0 S2TC_REFINE_COLORS=ALWAYS t "$i".tga "$i"-norand-wavg-r.dds bin/s2tc
179 S2TC_COLORDIST_MODE=WAVG S2TC_RANDOM_COLORS=-1 S2TC_REFINE_COLORS=ALWAYS t "$i".tga "$i"-faster-wavg-r.dds bin/s2tc