Skip to content

Commit

Permalink
PQOI alpha-blending fix
Browse files Browse the repository at this point in the history
  • Loading branch information
profezzorn committed Jun 23, 2024
1 parent c9874fe commit 24c2378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pqoi/pqoi.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ class AlphaDecoder : public PqoiDecoder {
// This transform should already have been done on the alpha values.
// alpha = ((255 - alpha) * 33) >> 8;
uint32_t tmp = (out * 0x10001) & 0x7E0F81F;
tmp = ((tmp * alpha) >> 5) & 0x7EF81F;
tmp = ((tmp * alpha) >> 5) & 0x7E0F81F;
out = tmp + (tmp >> 16) + in;
}
void Apply(const uint8_t* in, const uint8_t* input_end, uint16_t* out, uint16_t* end) {
Expand Down

0 comments on commit 24c2378

Please sign in to comment.