revamp the point-sampling functions by processing a full plane

-nofancy is slower than fancy upsampler, because the latter has SSE2 optim.

Change-Id: Ibf22e5a8ea1de86a54248d4a4ecc63d514c01b88
This commit is contained in:
Pascal Massimino
2014-05-20 09:43:02 -07:00
parent 2b5cb32612
commit a2f8b28905
4 changed files with 115 additions and 121 deletions

View File

@ -195,13 +195,23 @@ void WebPInitUpsamplersNEON(void);
#endif // FANCY_UPSAMPLING
// Point-sampling methods.
typedef void (*WebPSampleLinePairFunc)(
const uint8_t* top_y, const uint8_t* bottom_y,
const uint8_t* u, const uint8_t* v,
uint8_t* top_dst, uint8_t* bottom_dst, int len);
typedef void (*WebPSamplePlaneFunc)(const uint8_t* y, int y_stride,
const uint8_t* u, const uint8_t* v,
int uv_stride,
uint8_t* dst, int dst_stride,
int width, int height);
typedef void (*WebPSamplerRowFunc)(const uint8_t* y,
const uint8_t* u, const uint8_t* v,
uint8_t* dst, int len);
// Generic function to apply 'WebPSamplerRowFunc' to the whole plane:
void WebPSamplerProcessPlane(const uint8_t* y, int y_stride,
const uint8_t* u, const uint8_t* v, int uv_stride,
uint8_t* dst, int dst_stride,
int width, int height, WebPSamplerRowFunc func);
// Sampling functions to convert YUV to RGB(A) modes
extern WebPSampleLinePairFunc WebPSamplers[/* MODE_LAST */];
extern WebPSamplePlaneFunc WebPSamplers[/* MODE_LAST */];
// Initializes MIPS version of the samplers.
void WebPInitSamplersMIPS32(void);