Open lexaknyazev opened 3 years ago
Columns are existing or potential LUTs, rows are per-block selector usage, and cells are max error values.
Simple transcoding suggestions:
0 1 2
LUT for blocks with 0 1
selectors;1 2 3
LUT for blocks with 2 3
selectors.Optional next steps to consider:
0 3
LUT;0 1 3
and 0 2 3
LUTs;This is awesome - thanks! I'll need to parse this an absorb it. (Right now the focus is on OpenCL come hell or high water.)
Currently, the transcoder chooses the predefined EAC A8 configuration (i.e., the base color, the multiplier, the table index, and the selectors) based on the ETC1S selectors used. For example, if an ETC1S block uses only selectors
1
and2
, the transcoder would choose a mapping configuration optimized for this exact case.Still, there are two potential improvements (with some tradeoffs).
The predefined tables consider only minimum and maximum selector values, ignoring the gaps. For example, an ETC1S block that uses only
0
and2
would be converted as if it also uses1
, thus potentially producing less optimal output in about 16 cases.A lower-hanging fruit is the range selection code that always falls back to full-range configurations even when a more optimal option is available. For example, an ETC1S block that uses only
0
and1
is converted with the full-range configuration although0-2
range would be better.