Move ARGB->YUV functions from dec/vp8l.c to dsp/yuv.c

also switch to using ExtractAlpha() instead of hard-coding the loop.

The ARGBToY/UV functions are rather easy to port to SSE2 / NEON.

Change-Id: I8f1346a9ca427a36ce2d6c848369ca7964d8b3c7
This commit is contained in:
Pascal Massimino
2015-10-27 02:37:45 -07:00
parent 469ba2cdfd
commit fa8927efe4
3 changed files with 100 additions and 49 deletions

View File

@ -324,6 +324,19 @@ void WebPInitSamplers(void);
// Must be called before using WebPYUV444Converters[]
void WebPInitYUV444Converters(void);
//------------------------------------------------------------------------------
// ARGB -> YUV converters (for lossless decoding)
// Convert ARGB samples to luma Y.
extern void (*WebPConvertARGBToY)(const uint32_t* argb, uint8_t* y, int width);
// Convert ARGB samples to U/V with downsampling. do_store should be '1' for
// even lines and '0' for odd ones. 'src_width' is the original width, not
// the U/V one.
extern void (*WebPConvertARGBToUV)(const uint32_t* argb, uint8_t* u, uint8_t* v,
int src_width, int do_store);
// Must be called before using WebPConvertARGBToXXX
void WebPInitConvertARGBToYUV(void);
//------------------------------------------------------------------------------
// Rescaler