mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 05:49:51 +02:00
introduce WebPMemToUint32 and WebPUint32ToMem for memory access
it uses memcpy() when unaligned memory write is tricky Change-Id: I5d966ca9d19e9b43ac90140fa487824116982874
This commit is contained in:
@ -261,10 +261,10 @@ static void HE4(uint8_t* dst) { // horizontal
|
||||
const int C = dst[-1 + BPS];
|
||||
const int D = dst[-1 + 2 * BPS];
|
||||
const int E = dst[-1 + 3 * BPS];
|
||||
*(uint32_t*)(dst + 0 * BPS) = 0x01010101U * AVG3(A, B, C);
|
||||
*(uint32_t*)(dst + 1 * BPS) = 0x01010101U * AVG3(B, C, D);
|
||||
*(uint32_t*)(dst + 2 * BPS) = 0x01010101U * AVG3(C, D, E);
|
||||
*(uint32_t*)(dst + 3 * BPS) = 0x01010101U * AVG3(D, E, E);
|
||||
WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(A, B, C));
|
||||
WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(B, C, D));
|
||||
WebPUint32ToMem(dst + 2 * BPS, 0x01010101U * AVG3(C, D, E));
|
||||
WebPUint32ToMem(dst + 3 * BPS, 0x01010101U * AVG3(D, E, E));
|
||||
}
|
||||
|
||||
static void DC4(uint8_t* dst) { // DC
|
||||
|
Reference in New Issue
Block a user