mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 21:39:59 +02:00
rename the pretentious SmartYUV into SharpYUV
Change-Id: Ifeeb9cb85896c5f3ba0cc1c2c821f8d00295f69e
This commit is contained in:
@ -429,11 +429,11 @@ extern void WebPConvertRGBA32ToUV_C(const uint16_t* rgb,
|
||||
uint8_t* u, uint8_t* v, int width);
|
||||
|
||||
// utilities for accurate RGB->YUV conversion
|
||||
extern uint64_t (*WebPSmartYUVUpdateY)(const uint16_t* src, const uint16_t* ref,
|
||||
extern uint64_t (*WebPSharpYUVUpdateY)(const uint16_t* src, const uint16_t* ref,
|
||||
uint16_t* dst, int len);
|
||||
extern void (*WebPSmartYUVUpdateRGB)(const int16_t* src, const int16_t* ref,
|
||||
extern void (*WebPSharpYUVUpdateRGB)(const int16_t* src, const int16_t* ref,
|
||||
int16_t* dst, int len);
|
||||
extern void (*WebPSmartYUVFilterRow)(const int16_t* A, const int16_t* B,
|
||||
extern void (*WebPSharpYUVFilterRow)(const int16_t* A, const int16_t* B,
|
||||
int len,
|
||||
const uint16_t* best_y, uint16_t* out);
|
||||
|
||||
|
@ -251,7 +251,7 @@ static uint16_t clip_y(int v) {
|
||||
return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v;
|
||||
}
|
||||
|
||||
static uint64_t SmartYUVUpdateY_C(const uint16_t* ref, const uint16_t* src,
|
||||
static uint64_t SharpYUVUpdateY_C(const uint16_t* ref, const uint16_t* src,
|
||||
uint16_t* dst, int len) {
|
||||
uint64_t diff = 0;
|
||||
int i;
|
||||
@ -264,7 +264,7 @@ static uint64_t SmartYUVUpdateY_C(const uint16_t* ref, const uint16_t* src,
|
||||
return diff;
|
||||
}
|
||||
|
||||
static void SmartYUVUpdateRGB_C(const int16_t* ref, const int16_t* src,
|
||||
static void SharpYUVUpdateRGB_C(const int16_t* ref, const int16_t* src,
|
||||
int16_t* dst, int len) {
|
||||
int i;
|
||||
for (i = 0; i < len; ++i) {
|
||||
@ -273,7 +273,7 @@ static void SmartYUVUpdateRGB_C(const int16_t* ref, const int16_t* src,
|
||||
}
|
||||
}
|
||||
|
||||
static void SmartYUVFilterRow_C(const int16_t* A, const int16_t* B, int len,
|
||||
static void SharpYUVFilterRow_C(const int16_t* A, const int16_t* B, int len,
|
||||
const uint16_t* best_y, uint16_t* out) {
|
||||
int i;
|
||||
for (i = 0; i < len; ++i, ++A, ++B) {
|
||||
@ -297,18 +297,18 @@ void (*WebPConvertARGBToY)(const uint32_t* argb, uint8_t* y, int width);
|
||||
void (*WebPConvertARGBToUV)(const uint32_t* argb, uint8_t* u, uint8_t* v,
|
||||
int src_width, int do_store);
|
||||
|
||||
uint64_t (*WebPSmartYUVUpdateY)(const uint16_t* ref, const uint16_t* src,
|
||||
uint64_t (*WebPSharpYUVUpdateY)(const uint16_t* ref, const uint16_t* src,
|
||||
uint16_t* dst, int len);
|
||||
void (*WebPSmartYUVUpdateRGB)(const int16_t* ref, const int16_t* src,
|
||||
void (*WebPSharpYUVUpdateRGB)(const int16_t* ref, const int16_t* src,
|
||||
int16_t* dst, int len);
|
||||
void (*WebPSmartYUVFilterRow)(const int16_t* A, const int16_t* B, int len,
|
||||
void (*WebPSharpYUVFilterRow)(const int16_t* A, const int16_t* B, int len,
|
||||
const uint16_t* best_y, uint16_t* out);
|
||||
|
||||
static volatile VP8CPUInfo rgba_to_yuv_last_cpuinfo_used =
|
||||
(VP8CPUInfo)&rgba_to_yuv_last_cpuinfo_used;
|
||||
|
||||
extern void WebPInitConvertARGBToYUVSSE2(void);
|
||||
extern void WebPInitSmartYUVSSE2(void);
|
||||
extern void WebPInitSharpYUVSSE2(void);
|
||||
|
||||
WEBP_TSAN_IGNORE_FUNCTION void WebPInitConvertARGBToYUV(void) {
|
||||
if (rgba_to_yuv_last_cpuinfo_used == VP8GetCPUInfo) return;
|
||||
@ -321,15 +321,15 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitConvertARGBToYUV(void) {
|
||||
|
||||
WebPConvertRGBA32ToUV = WebPConvertRGBA32ToUV_C;
|
||||
|
||||
WebPSmartYUVUpdateY = SmartYUVUpdateY_C;
|
||||
WebPSmartYUVUpdateRGB = SmartYUVUpdateRGB_C;
|
||||
WebPSmartYUVFilterRow = SmartYUVFilterRow_C;
|
||||
WebPSharpYUVUpdateY = SharpYUVUpdateY_C;
|
||||
WebPSharpYUVUpdateRGB = SharpYUVUpdateRGB_C;
|
||||
WebPSharpYUVFilterRow = SharpYUVFilterRow_C;
|
||||
|
||||
if (VP8GetCPUInfo != NULL) {
|
||||
#if defined(WEBP_USE_SSE2)
|
||||
if (VP8GetCPUInfo(kSSE2)) {
|
||||
WebPInitConvertARGBToYUVSSE2();
|
||||
WebPInitSmartYUVSSE2();
|
||||
WebPInitSharpYUVSSE2();
|
||||
}
|
||||
#endif // WEBP_USE_SSE2
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ static uint16_t clip_y(int v) {
|
||||
return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v;
|
||||
}
|
||||
|
||||
static uint64_t SmartYUVUpdateY_SSE2(const uint16_t* ref, const uint16_t* src,
|
||||
static uint64_t SharpYUVUpdateY_SSE2(const uint16_t* ref, const uint16_t* src,
|
||||
uint16_t* dst, int len) {
|
||||
uint64_t diff = 0;
|
||||
uint32_t tmp[4];
|
||||
@ -777,7 +777,7 @@ static uint64_t SmartYUVUpdateY_SSE2(const uint16_t* ref, const uint16_t* src,
|
||||
return diff;
|
||||
}
|
||||
|
||||
static void SmartYUVUpdateRGB_SSE2(const int16_t* ref, const int16_t* src,
|
||||
static void SharpYUVUpdateRGB_SSE2(const int16_t* ref, const int16_t* src,
|
||||
int16_t* dst, int len) {
|
||||
int i = 0;
|
||||
for (i = 0; i + 8 <= len; i += 8) {
|
||||
@ -794,7 +794,7 @@ static void SmartYUVUpdateRGB_SSE2(const int16_t* ref, const int16_t* src,
|
||||
}
|
||||
}
|
||||
|
||||
static void SmartYUVFilterRow_SSE2(const int16_t* A, const int16_t* B, int len,
|
||||
static void SharpYUVFilterRow_SSE2(const int16_t* A, const int16_t* B, int len,
|
||||
const uint16_t* best_y, uint16_t* out) {
|
||||
int i;
|
||||
const __m128i kCst8 = _mm_set1_epi16(8);
|
||||
@ -846,18 +846,18 @@ static void SmartYUVFilterRow_SSE2(const int16_t* A, const int16_t* B, int len,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
extern void WebPInitSmartYUVSSE2(void);
|
||||
extern void WebPInitSharpYUVSSE2(void);
|
||||
|
||||
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSmartYUVSSE2(void) {
|
||||
WebPSmartYUVUpdateY = SmartYUVUpdateY_SSE2;
|
||||
WebPSmartYUVUpdateRGB = SmartYUVUpdateRGB_SSE2;
|
||||
WebPSmartYUVFilterRow = SmartYUVFilterRow_SSE2;
|
||||
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSharpYUVSSE2(void) {
|
||||
WebPSharpYUVUpdateY = SharpYUVUpdateY_SSE2;
|
||||
WebPSharpYUVUpdateRGB = SharpYUVUpdateRGB_SSE2;
|
||||
WebPSharpYUVFilterRow = SharpYUVFilterRow_SSE2;
|
||||
}
|
||||
|
||||
#else // !WEBP_USE_SSE2
|
||||
|
||||
WEBP_DSP_INIT_STUB(WebPInitSamplersSSE2)
|
||||
WEBP_DSP_INIT_STUB(WebPInitConvertARGBToYUVSSE2)
|
||||
WEBP_DSP_INIT_STUB(WebPInitSmartYUVSSE2)
|
||||
WEBP_DSP_INIT_STUB(WebPInitSharpYUVSSE2)
|
||||
|
||||
#endif // WEBP_USE_SSE2
|
||||
|
Reference in New Issue
Block a user