mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-11 21:35:27 -04:00
feat(ricepp): slight decode perf boost
This commit is contained in:
parent
22f753340a
commit
3b7d6ed861
@ -60,9 +60,7 @@ void decode_block(V block, BitstreamReader& reader, PixelTraits const& traits,
|
||||
auto const fs = fsp1 - 1;
|
||||
for (auto& b : block) {
|
||||
value_type diff = reader.find_first_set() << fs;
|
||||
if (fs > 0) {
|
||||
diff |= reader.template read_bits<value_type>(fs);
|
||||
}
|
||||
diff |= reader.template read_bits<value_type>(fs);
|
||||
last += static_cast<std::make_signed_t<value_type>>(
|
||||
(diff & 1) ? ~(diff >> 1) : (diff >> 1));
|
||||
b = traits.write(last);
|
||||
|
Loading…
x
Reference in New Issue
Block a user