Skip to content

Commit

Permalink
Fix BC6 block decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Jul 17, 2022
1 parent 2258f23 commit 37f766b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libImaging/BcnDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,10 @@ decode_bc6_block(rgb32f *col, const UINT8 *src, int sign) {
}
}
if (info->tr) { /* apply deltas */
for (i = 3; i < numep; i++) {
endpoints[i] = (endpoints[i] + endpoints[0]) & mask;
for (i = 3; i < numep; i += 3) {
endpoints[i + 0] = (endpoints[i + 0] + endpoints[0]) & mask;
endpoints[i + 1] = (endpoints[i + 1] + endpoints[1]) & mask;
endpoints[i + 2] = (endpoints[i + 2] + endpoints[2]) & mask;
}
if (sign) {
for (i = 3; i < numep; i += 3) {
Expand Down

0 comments on commit 37f766b

Please sign in to comment.