mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
Fix CopyTileWithPrediction()
so that it uses original values of left, top etc for prediction rather than the predicted values of the same. Also, do some renaming in the same to make it more readable. Change-Id: I2fe94e35a6700bd437f5c601e2af12323bf32445
This commit is contained in:
@ -38,7 +38,8 @@ void VP8LInverseTransform(const struct VP8LTransform* const transform,
|
||||
void VP8LSubtractGreenFromBlueAndRed(uint32_t* argb_data, int num_pixs);
|
||||
|
||||
void VP8LResidualImage(int width, int height, int bits,
|
||||
uint32_t* const argb, uint32_t* const image);
|
||||
uint32_t* const argb, uint32_t* const argb_scratch,
|
||||
uint32_t* const image);
|
||||
|
||||
void VP8LColorSpaceTransform(int width, int height, int bits, int step,
|
||||
uint32_t* const argb, uint32_t* image);
|
||||
@ -67,8 +68,10 @@ double VP8LFastLog(int v);
|
||||
|
||||
// In-place difference of each component with mod 256.
|
||||
static WEBP_INLINE uint32_t VP8LSubPixels(uint32_t a, uint32_t b) {
|
||||
const uint32_t alpha_and_green = (a & 0xff00ff00u) - (b & 0xff00ff00u);
|
||||
const uint32_t red_and_blue = (a & 0x00ff00ffu) - (b & 0x00ff00ffu);
|
||||
const uint32_t alpha_and_green =
|
||||
0x00ff00ffu + (a & 0xff00ff00u) - (b & 0xff00ff00u);
|
||||
const uint32_t red_and_blue =
|
||||
0xff00ff00u + (a & 0x00ff00ffu) - (b & 0x00ff00ffu);
|
||||
return (alpha_and_green & 0xff00ff00u) | (red_and_blue & 0x00ff00ffu);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user