Fix 8-bit mAB tables
We had no examples of this type, and didn't catch the table was parsed as -0.5 to 0.5 instead of 0 to 1. Change-Id: I904937a50deaeecfc89e271bf918eedc521bc8a2 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>bb10
parent
c24dcef97e
commit
e2413660f5
|
|
@ -940,7 +940,8 @@ static bool parseMabData(const QByteArray &data, const TagEntry &tagEntry, QColo
|
|||
qFromBigEndian<uint16_t>(data.constData() + tagEntry.offset + mab.clutOffset + 20, clutTable.size(), clutTable.data());
|
||||
parseCLUT(clutTable.constData(), (1.f/65535.f), &clutElement);
|
||||
} else {
|
||||
parseCLUT(data.constData() + tagEntry.offset + mab.clutOffset + 20, (1.f/255.f), &clutElement);
|
||||
const uint8_t *clutTable = reinterpret_cast<const uint8_t *>(data.constData() + tagEntry.offset + mab.clutOffset + 20);
|
||||
parseCLUT(clutTable, (1.f/255.f), &clutElement);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue