Skip to content

Commit

Permalink
fixed lookup if ld = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bourgesl committed Jul 20, 2020
1 parent df72043 commit 76e46b8
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,9 @@ void compose(final int srcRGBA, final Raster srcIn,

// in range [0; 32385] (15bits):
ld = luminance10b(dr, dg, db); // Y (10bits)
// TODO: use da to weight luminance ld ?
at_addr_a = at_addr;
if (ld != 0) {
// lookup offset to table:
at_addr_a += _unsafe.getInt(ai_addr_ls
+ (_unsafe.getInt(lt_addr + (ld << 2)) << 2));
}
// lookup offset to table:
at_addr_a = at_addr + _unsafe.getInt(ai_addr_ls
+ ((ld != 0) ? (_unsafe.getInt(lt_addr + (ld << 2)) << 2) : 0));
}
// dstPixel is Gamma-corrected Linear RGBA.

Expand Down

0 comments on commit 76e46b8

Please sign in to comment.