mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 21:39:59 +02:00
separate SSE2 lossless functions into its own file
expose the predictor array as function pointers instead of each individual sub-function + merged Average2() into ClampedAddSubtractHalf directly + unified the signature as "VP8LProcessBlueAndRedFunc" no speed diff observed Change-Id: Ic3c45dff11884a8330a9ad38c2c8e82491c6e044
This commit is contained in:
@ -23,21 +23,14 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Signatures and generic function-pointers
|
||||
|
||||
typedef uint32_t (*VP8LPredClampedAddSubFunc)(uint32_t c0, uint32_t c1,
|
||||
uint32_t c2);
|
||||
typedef uint32_t (*VP8LPredSelectFunc)(uint32_t c0, uint32_t c1, uint32_t c2);
|
||||
typedef void (*VP8LSubtractGreenFromBlueAndRedFunc)(uint32_t* argb_data,
|
||||
int num_pixs);
|
||||
typedef void (*VP8LAddGreenToBlueAndRedFunc)(uint32_t* data_start,
|
||||
const uint32_t* data_end);
|
||||
typedef uint32_t (*VP8LPredictorFunc)(uint32_t left, const uint32_t* const top);
|
||||
extern VP8LPredictorFunc VP8LPredictors[16];
|
||||
|
||||
extern VP8LPredClampedAddSubFunc VP8LClampedAddSubtractFull;
|
||||
extern VP8LPredClampedAddSubFunc VP8LClampedAddSubtractHalf;
|
||||
extern VP8LPredSelectFunc VP8LSelect;
|
||||
extern VP8LSubtractGreenFromBlueAndRedFunc VP8LSubtractGreenFromBlueAndRed;
|
||||
extern VP8LAddGreenToBlueAndRedFunc VP8LAddGreenToBlueAndRed;
|
||||
typedef void (*VP8LProcessBlueAndRedFunc)(uint32_t* argb_data, int num_pixels);
|
||||
extern VP8LProcessBlueAndRedFunc VP8LSubtractGreenFromBlueAndRed;
|
||||
extern VP8LProcessBlueAndRedFunc VP8LAddGreenToBlueAndRed;
|
||||
|
||||
typedef void (*VP8LConvertFunc)(const uint32_t* src, int num_pixels,
|
||||
uint8_t* dst);
|
||||
@ -47,6 +40,23 @@ extern VP8LConvertFunc VP8LConvertBGRAToRGBA4444;
|
||||
extern VP8LConvertFunc VP8LConvertBGRAToRGB565;
|
||||
extern VP8LConvertFunc VP8LConvertBGRAToBGR;
|
||||
|
||||
extern void VP8LDspInitSSE2(void);
|
||||
|
||||
// Expose some C-only fallback functions
|
||||
extern void VP8LConvertBGRAToRGB_C(const uint32_t* src,
|
||||
int num_pixels, uint8_t* dst);
|
||||
extern void VP8LConvertBGRAToRGBA_C(const uint32_t* src,
|
||||
int num_pixels, uint8_t* dst);
|
||||
extern void VP8LConvertBGRAToRGBA4444_C(const uint32_t* src,
|
||||
int num_pixels, uint8_t* dst);
|
||||
extern void VP8LConvertBGRAToRGB565_C(const uint32_t* src,
|
||||
int num_pixels, uint8_t* dst);
|
||||
extern void VP8LConvertBGRAToBGR_C(const uint32_t* src,
|
||||
int num_pixels, uint8_t* dst);
|
||||
extern void VP8LSubtractGreenFromBlueAndRed_C(uint32_t* argb_data,
|
||||
int num_pixels);
|
||||
extern void VP8LAddGreenToBlueAndRed_C(uint32_t* data, int num_pixels);
|
||||
|
||||
// Must be called before calling any of the above methods.
|
||||
void VP8LDspInit(void);
|
||||
|
||||
|
Reference in New Issue
Block a user