Menu

Tree [ea51bf] nougat-x86 marshmallow-x86 oreo-x86 android-x86-6.0-r1 android-x86-6.0-r2 android-x86-6.0-r3 android-x86-7.1-r1 android-x86-7.1-r2 android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5 android-x86-8.1-r1 android-x86-8.1-r2 /
 History

HTTPS access


File Date Author Commit
 m4 2011-07-14 Rudolf Polzer Rudolf Polzer [2a17be] clarify license of DP-derived parts
 tests 2015-12-19 Rudolf Polzer Rudolf Polzer [9d9f93] Remove two now unavailable test pictures.
 .gitignore 2014-06-03 Jean-Sébastien Pédron Jean-Sébastien Pédron [1c3a38] Add "compile" to .gitignore
 Android.mk 2016-02-19 WuZhen WuZhen [ea51bf] add Android.mk to build for android
 COPYING 2011-07-15 Rudolf Polzer Rudolf Polzer [292af1] fix name in license ;)
 Makefile.am 2015-12-20 Matthias Mailänder Matthias Mailänder [a25921] add man pages for tools
 README.txt 2014-11-13 divVerent divVerent [af3bd1] Update README.txt
 autogen.sh 2011-07-14 Rudolf Polzer Rudolf Polzer [841aa1] autotools!
 configure.ac 2015-12-19 Rudolf Polzer Rudolf Polzer [b07f8a] libtxc_dxtn: stop depending on libstdc++.
 s2tc_algorithm.cpp 2015-12-19 Rudolf Polzer Rudolf Polzer [b07f8a] libtxc_dxtn: stop depending on libstdc++.
 s2tc_algorithm.h 2014-11-13 divVerent divVerent [064cb3] Prepare for adding a W0AVG mode.
 s2tc_common.h 2011-07-22 Rudolf Polzer Rudolf Polzer [c49365] Refactor the code to provide a better framework...
 s2tc_compress.1 2015-12-20 Matthias Mailänder Matthias Mailänder [a25921] add man pages for tools
 s2tc_compress.c 2015-12-19 Rudolf Polzer Rudolf Polzer [1050ad] Convert s2tc_compress and s2tc_decompress tools...
 s2tc_decompress.1 2015-12-20 Matthias Mailänder Matthias Mailänder [a25921] add man pages for tools
 s2tc_decompress.c 2015-12-19 Rudolf Polzer Rudolf Polzer [1050ad] Convert s2tc_compress and s2tc_decompress tools...
 s2tc_from_s3tc.1 2015-12-20 Matthias Mailänder Matthias Mailänder [a25921] add man pages for tools
 s2tc_from_s3tc.cpp 2011-08-09 Rudolf Polzer Rudolf Polzer [3475c3] fix DXT5a dithering
 s2tc_libtxc_dxtn.cpp 2014-11-13 divVerent divVerent [a5a8ef] Make the W0AVG mode available via S2TC_COLORDIS...
 s2tc_license.h 2015-12-19 Rudolf Polzer Rudolf Polzer [1050ad] Convert s2tc_compress and s2tc_decompress tools...
 txc_dxtn.h 2011-07-14 Rudolf Polzer Rudolf Polzer [1f6bad] make .h file identical to libtxc_dxtn's
 txc_dxtn.pc.in 2011-07-14 Rudolf Polzer Rudolf Polzer [e2dca9] rename the .pc file

Read Me

S2TC Environment Variables
==========================

Color Distance Function
-----------------------
The following color distance functions can be selected by setting the
environment variable `S2TC_COLORDIST_MODE`:

*   `RGB`: weighted YCbCr difference assuming linear input
*   `YUV`: weighted Y'Cb'Cr' difference assuming sRGB input
*   `SRGB`: weighted YCbCr difference assuming sRGB input
*   `SRGB_MIXED`: weighted "Y'(Y)Cb'Cr'" difference assuming sRGB input
*   `AVG`: standard average of component difference (generic)
*   `WAVG`: weighted RGB average of component difference
*   `W0AVG`: superfast weighted RGB average of component difference
*   `NORMALMAP`: vector distance after normalization

The default is `WAVG`, which is a good compromise between speed and quality for
RGB and sRGB data. For optimum quality on sRGB input, try `SRGB_MIXED`.

The color distance function defines how "closeness" of pixel values is judged
when the pixel color values are evaluated, colors are selected, or during
refinement.

Color Selection
---------------
The environment variable `S2TC_RANDOM_COLORS` can be set the following way:

*   `-1`: quick selection (darkest and brightest color are chosen, which is
    similar to the method in the Color Cell Compression paper)
*   `0`: all 16 input colors of a block are considered
*   greater than `0`: additionally, that many random color values in the range
    of the input color values are considered

The default is `-1`, which is fast but poor quality, however ideally suited for
online compression. For optimum quality, try `64`.

A bad color selection can later be compensated for by color refinement.

Color Refinement
----------------
The environment variable `S2TC_REFINE_COLORS` can be set to the following values:

*   `NEVER`: never run color refinement
*   `ALWAYS`: unconditionally perform color refinement
*   `LOOP`: perform color refinement, evaluate its output and discard it if it
    didn't improve quality, re-evaluate the pixel color values, and repeat
    until no improvement could be made

The default is `ALWAYS`, which is fast and decent quality, and usually doesn't
make things worse. For optimum quality, try `LOOP`.

Color refinement recalculates the color palette of a block after the pixel
value decision by averaging the color values of those encoded as c0 or c1, and
is a technique that helps a lot of the initial color selection was poor (e.g.
if `S2TC_RANDOM_COLORS` was not set, or set to `-1`).
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.