mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Merge "~3-4% faster lossless encoding"
This commit is contained in:
commit
06d456f685
@ -884,16 +884,18 @@ static WEBP_INLINE uint8_t TransformColorBlue(uint8_t green_to_blue,
|
||||
static WEBP_INLINE int SkipRepeatedPixels(const uint32_t* const argb,
|
||||
int ix, int xsize) {
|
||||
const uint32_t v = argb[ix];
|
||||
if (ix >= xsize + 3) {
|
||||
if (v == argb[ix - xsize] &&
|
||||
argb[ix - 1] == argb[ix - xsize - 1] &&
|
||||
argb[ix - 2] == argb[ix - xsize - 2] &&
|
||||
argb[ix - 3] == argb[ix - xsize - 3]) {
|
||||
if (ix >= 3) {
|
||||
if (v == argb[ix - 3] && v == argb[ix - 2] && v == argb[ix - 1]) {
|
||||
return 1;
|
||||
}
|
||||
return v == argb[ix - 3] && v == argb[ix - 2] && v == argb[ix - 1];
|
||||
} else if (ix >= 3) {
|
||||
return v == argb[ix - 3] && v == argb[ix - 2] && v == argb[ix - 1];
|
||||
if (ix >= xsize + 3) {
|
||||
if (v == argb[ix - xsize] &&
|
||||
argb[ix - 3] == argb[ix - xsize - 3] &&
|
||||
argb[ix - 2] == argb[ix - xsize - 2] &&
|
||||
argb[ix - 1] == argb[ix - xsize - 1]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user