add LUT-free reference code for YUV->RGB conversion.

Reported to eventually be 4% on ARM
(see https://code.google.com/p/webp/issues/detail?id=134 for details)
We might activate it selectively later...

Output values is not bitwise the same as the LUT-based
version, but difference is only +/-1 at max.

Change-Id: I1cc790ff4459885ed2ae2e72f31c5f3740095f07
This commit is contained in:
skal
2013-03-14 20:28:29 +01:00
parent 14ef5005a2
commit 126974b45b
2 changed files with 112 additions and 15 deletions

View File

@ -15,7 +15,7 @@
extern "C" {
#endif
enum { YUV_HALF = 1 << (YUV_FIX - 1) };
#ifdef WEBP_YUV_USE_TABLE
int16_t VP8kVToR[256], VP8kUToB[256];
int32_t VP8kVToG[256], VP8kUToG[256];
@ -62,6 +62,12 @@ void VP8YUVInit(void) {
done = 1;
}
#else
void VP8YUVInit(void) {}
#endif // WEBP_YUV_USE_TABLE
#if defined(__cplusplus) || defined(c_plusplus)
} // extern "C"
#endif