Revert "Optimize png_reverse_filter_copy_line_gray_alpha"
This reverts commit 710226504e
.
This commit is contained in:
parent
7c19d4d009
commit
e8170a4354
|
@ -299,16 +299,20 @@ static void png_reverse_filter_copy_line_gray_alpha(uint32_t *data,
|
||||||
const uint8_t *decoded, unsigned width,
|
const uint8_t *decoded, unsigned width,
|
||||||
unsigned bpp)
|
unsigned bpp)
|
||||||
{
|
{
|
||||||
uint32_t *data_ptr = NULL;
|
unsigned i;
|
||||||
|
|
||||||
bpp /= 8;
|
bpp /= 8;
|
||||||
|
|
||||||
for (data_ptr = &data[0]; data_ptr < data + width; data_ptr++)
|
for (i = 0; i < width; i++)
|
||||||
{
|
{
|
||||||
uint32_t gray = *(decoded);
|
uint32_t gray, alpha;
|
||||||
uint32_t alpha = *(decoded + bpp);
|
|
||||||
decoded += (2 * bpp);
|
gray = *decoded;
|
||||||
*data_ptr = (gray * 0x010101) | (alpha << 24);
|
decoded += bpp;
|
||||||
|
alpha = *decoded;
|
||||||
|
decoded += bpp;
|
||||||
|
|
||||||
|
data[i] = (gray * 0x010101) | (alpha << 24);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue