This commit is contained in:
Ameer J 2023-08-06 12:18:55 -04:00
parent b36e645fee
commit 31a0cff036

View File

@ -809,18 +809,15 @@ uint UnquantizeTexelWeight(EncodingData val) {
const uint A = ReplicateBitTo7((bitval & 1)); const uint A = ReplicateBitTo7((bitval & 1));
uint B = 0, C = 0, D = 0; uint B = 0, C = 0, D = 0;
uint result = 0; uint result = 0;
const uint bitlen_0_results[5] = {0, 16, 32, 48, 64};
switch (encoding) { switch (encoding) {
case JUST_BITS: case JUST_BITS:
result = FastReplicateTo6(bitval, bitlen); return FastReplicateTo6(bitval, bitlen);
break;
case TRIT: { case TRIT: {
D = QuintTritValue(val); D = QuintTritValue(val);
switch (bitlen) { switch (bitlen) {
case 0: { case 0:
const uint results[3] = {0, 32, 63}; return bitlen_0_results[D * 2];
result = results[D];
break;
}
case 1: { case 1: {
C = 50; C = 50;
break; break;
@ -845,11 +842,8 @@ uint UnquantizeTexelWeight(EncodingData val) {
case QUINT: { case QUINT: {
D = QuintTritValue(val); D = QuintTritValue(val);
switch (bitlen) { switch (bitlen) {
case 0: { case 0:
const uint results[5] = {0, 16, 32, 47, 63}; return bitlen_0_results[D];
result = results[D];
break;
}
case 1: { case 1: {
C = 28; C = 28;
break; break;