mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 06:49:53 +02:00
lossy decoding: correct alpha-rescaling for YUVA format
The luminance needs to be pre- and post- multiplied by the alpha value in case of rescaling, for proper averaging. Also: - removed util/alpha_processing and moved it to dsp/ - removed WebPInitPremultiply() which was mostly useless and merged it with the new function WebPInitAlphaProcessing() Change-Id: If089cefd4ec53f6880a791c476fb1c7f7c5a8e60
This commit is contained in:
@ -189,7 +189,6 @@ SSE2_UPSAMPLE_FUNC(UpsampleBgraLinePair, VP8YuvToBgra, 4)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
extern void WebPInitUpsamplersSSE2(void);
|
||||
extern void WebPInitPremultiplySSE2(void);
|
||||
|
||||
#ifdef FANCY_UPSAMPLING
|
||||
|
||||
@ -202,11 +201,6 @@ void WebPInitUpsamplersSSE2(void) {
|
||||
WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair;
|
||||
WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair;
|
||||
WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair;
|
||||
#endif // WEBP_USE_SSE2
|
||||
}
|
||||
|
||||
void WebPInitPremultiplySSE2(void) {
|
||||
#if defined(WEBP_USE_SSE2)
|
||||
WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair;
|
||||
WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair;
|
||||
#endif // WEBP_USE_SSE2
|
||||
@ -215,6 +209,6 @@ void WebPInitPremultiplySSE2(void) {
|
||||
#else
|
||||
|
||||
// this empty function is to avoid an empty .o
|
||||
void WebPInitPremultiplySSE2(void) {}
|
||||
void WebPInitUpsamplersSSE2(void) {}
|
||||
|
||||
#endif // FANCY_UPSAMPLING
|
||||
|
Reference in New Issue
Block a user