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:
skal
2014-05-26 18:05:03 +02:00
committed by Gerrit Code Review
parent 78c12ed8e6
commit 399b916d27
14 changed files with 193 additions and 227 deletions

View File

@ -237,7 +237,6 @@ NEON_UPSAMPLE_FUNC(UpsampleBgraLinePair, Bgra, 4)
//------------------------------------------------------------------------------
extern void WebPInitUpsamplersNEON(void);
extern void WebPInitPremultiplyNEON(void);
#ifdef FANCY_UPSAMPLING
@ -249,11 +248,6 @@ void WebPInitUpsamplersNEON(void) {
WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair;
WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair;
WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair;
#endif // WEBP_USE_NEON
}
void WebPInitPremultiplyNEON(void) {
#if defined(WEBP_USE_NEON)
WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair;
WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair;
#endif // WEBP_USE_NEON
@ -262,6 +256,6 @@ void WebPInitPremultiplyNEON(void) {
#else
// this empty function is to avoid an empty .o
void WebPInitPremultiplyNEON(void) {}
void WebPInitUpsamplersNEON(void) {}
#endif // FANCY_UPSAMPLING