mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
Rename SharpYUV to SharpYuv for consistency.
Change-Id: I21df96b4c8f8fa97bfd2ac9c806c7e5119b55691
This commit is contained in:
parent
40e8aa57f8
commit
8fa053d134
@ -234,8 +234,8 @@ static void InterpolateTwoRows(const fixed_y_t* const best_y,
|
||||
out1[0] = Filter2(cur_uv[0], prev_uv[0], best_y[0]);
|
||||
out2[0] = Filter2(cur_uv[0], next_uv[0], best_y[w]);
|
||||
|
||||
SharpYUVFilterRow(cur_uv, prev_uv, len, best_y + 0 + 1, out1 + 1);
|
||||
SharpYUVFilterRow(cur_uv, next_uv, len, best_y + w + 1, out2 + 1);
|
||||
SharpYuvFilterRow(cur_uv, prev_uv, len, best_y + 0 + 1, out1 + 1);
|
||||
SharpYuvFilterRow(cur_uv, next_uv, len, best_y + w + 1, out2 + 1);
|
||||
|
||||
// special boundary case for i == w - 1 when w is even
|
||||
if (!(w & 1)) {
|
||||
@ -403,8 +403,8 @@ static int DoSharpArgbToYuv(const uint8_t* r_ptr, const uint8_t* g_ptr,
|
||||
UpdateChroma(src1, src2, best_rgb_uv, uv_w);
|
||||
|
||||
// update two rows of Y and one row of RGB
|
||||
diff_y_sum += SharpYUVUpdateY(target_y, best_rgb_y, best_y, 2 * w);
|
||||
SharpYUVUpdateRGB(target_uv, best_rgb_uv, best_uv, 3 * uv_w);
|
||||
diff_y_sum += SharpYuvUpdateY(target_y, best_rgb_y, best_y, 2 * w);
|
||||
SharpYuvUpdateRGB(target_uv, best_rgb_uv, best_uv, 3 * uv_w);
|
||||
|
||||
best_y += 2 * w;
|
||||
best_uv += 3 * uv_w;
|
||||
|
@ -26,7 +26,7 @@ static uint16_t clip_y(int v) {
|
||||
return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v;
|
||||
}
|
||||
|
||||
static uint64_t SharpYUVUpdateY_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;
|
||||
@ -39,7 +39,7 @@ static uint64_t SharpYUVUpdateY_C(const uint16_t* ref, const uint16_t* src,
|
||||
return diff;
|
||||
}
|
||||
|
||||
static void SharpYUVUpdateRGB_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) {
|
||||
@ -48,7 +48,7 @@ static void SharpYUVUpdateRGB_C(const int16_t* ref, const int16_t* src,
|
||||
}
|
||||
}
|
||||
|
||||
static void SharpYUVFilterRow_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) {
|
||||
@ -64,38 +64,38 @@ static void SharpYUVFilterRow_C(const int16_t* A, const int16_t* B, int len,
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
uint64_t (*SharpYUVUpdateY)(const uint16_t* src, const uint16_t* ref,
|
||||
uint64_t (*SharpYuvUpdateY)(const uint16_t* src, const uint16_t* ref,
|
||||
uint16_t* dst, int len);
|
||||
void (*SharpYUVUpdateRGB)(const int16_t* src, const int16_t* ref, int16_t* dst,
|
||||
void (*SharpYuvUpdateRGB)(const int16_t* src, const int16_t* ref, int16_t* dst,
|
||||
int len);
|
||||
void (*SharpYUVFilterRow)(const int16_t* A, const int16_t* B, int len,
|
||||
void (*SharpYuvFilterRow)(const int16_t* A, const int16_t* B, int len,
|
||||
const uint16_t* best_y, uint16_t* out);
|
||||
|
||||
extern void InitSharpYUVSSE2(void);
|
||||
extern void InitSharpYUVNEON(void);
|
||||
extern void InitSharpYuvSSE2(void);
|
||||
extern void InitSharpYuvNEON(void);
|
||||
|
||||
void SharpYuvInitDsp(VP8CPUInfo cpu_info_func) {
|
||||
(void)cpu_info_func;
|
||||
|
||||
#if !WEBP_NEON_OMIT_C_CODE
|
||||
SharpYUVUpdateY = SharpYUVUpdateY_C;
|
||||
SharpYUVUpdateRGB = SharpYUVUpdateRGB_C;
|
||||
SharpYUVFilterRow = SharpYUVFilterRow_C;
|
||||
SharpYuvUpdateY = SharpYuvUpdateY_C;
|
||||
SharpYuvUpdateRGB = SharpYuvUpdateRGB_C;
|
||||
SharpYuvFilterRow = SharpYuvFilterRow_C;
|
||||
#endif
|
||||
|
||||
#if defined(WEBP_HAVE_SSE2)
|
||||
if (cpu_info_func == NULL || cpu_info_func(kSSE2)) {
|
||||
InitSharpYUVSSE2();
|
||||
InitSharpYuvSSE2();
|
||||
}
|
||||
#endif // WEBP_HAVE_SSE2
|
||||
|
||||
#if defined(WEBP_HAVE_NEON)
|
||||
if (WEBP_NEON_OMIT_C_CODE || cpu_info_func == NULL || cpu_info_func(kNEON)) {
|
||||
InitSharpYUVNEON();
|
||||
InitSharpYuvNEON();
|
||||
}
|
||||
#endif // WEBP_HAVE_NEON
|
||||
|
||||
assert(SharpYUVUpdateY != NULL);
|
||||
assert(SharpYUVUpdateRGB != NULL);
|
||||
assert(SharpYUVFilterRow != NULL);
|
||||
assert(SharpYuvUpdateY != NULL);
|
||||
assert(SharpYuvUpdateRGB != NULL);
|
||||
assert(SharpYuvFilterRow != NULL);
|
||||
}
|
||||
|
@ -16,11 +16,11 @@
|
||||
|
||||
#include "src/dsp/cpu.h"
|
||||
|
||||
extern uint64_t (*SharpYUVUpdateY)(const uint16_t* src, const uint16_t* ref,
|
||||
extern uint64_t (*SharpYuvUpdateY)(const uint16_t* src, const uint16_t* ref,
|
||||
uint16_t* dst, int len);
|
||||
extern void (*SharpYUVUpdateRGB)(const int16_t* src, const int16_t* ref,
|
||||
extern void (*SharpYuvUpdateRGB)(const int16_t* src, const int16_t* ref,
|
||||
int16_t* dst, int len);
|
||||
extern void (*SharpYUVFilterRow)(const int16_t* A, const int16_t* B, int len,
|
||||
extern void (*SharpYuvFilterRow)(const int16_t* A, const int16_t* B, int len,
|
||||
const uint16_t* best_y, uint16_t* out);
|
||||
|
||||
void SharpYuvInitDsp(VP8CPUInfo cpu_info_func);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
extern void InitSharpYUVNEON(void);
|
||||
extern void InitSharpYuvNEON(void);
|
||||
|
||||
#if defined(WEBP_USE_NEON)
|
||||
|
||||
@ -28,7 +28,7 @@ static uint16_t clip_y_NEON(int v) {
|
||||
return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v;
|
||||
}
|
||||
|
||||
static uint64_t SharpYUVUpdateY_NEON(const uint16_t* ref, const uint16_t* src,
|
||||
static uint64_t SharpYuvUpdateY_NEON(const uint16_t* ref, const uint16_t* src,
|
||||
uint16_t* dst, int len) {
|
||||
int i;
|
||||
const int16x8_t zero = vdupq_n_s16(0);
|
||||
@ -58,7 +58,7 @@ static uint64_t SharpYUVUpdateY_NEON(const uint16_t* ref, const uint16_t* src,
|
||||
return diff;
|
||||
}
|
||||
|
||||
static void SharpYUVUpdateRGB_NEON(const int16_t* ref, const int16_t* src,
|
||||
static void SharpYuvUpdateRGB_NEON(const int16_t* ref, const int16_t* src,
|
||||
int16_t* dst, int len) {
|
||||
int i;
|
||||
for (i = 0; i + 8 <= len; i += 8) {
|
||||
@ -75,7 +75,7 @@ static void SharpYUVUpdateRGB_NEON(const int16_t* ref, const int16_t* src,
|
||||
}
|
||||
}
|
||||
|
||||
static void SharpYUVFilterRow_NEON(const int16_t* A, const int16_t* B, int len,
|
||||
static void SharpYuvFilterRow_NEON(const int16_t* A, const int16_t* B, int len,
|
||||
const uint16_t* best_y, uint16_t* out) {
|
||||
int i;
|
||||
const int16x8_t max = vdupq_n_s16(MAX_Y);
|
||||
@ -120,14 +120,14 @@ static void SharpYUVFilterRow_NEON(const int16_t* A, const int16_t* B, int len,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
WEBP_TSAN_IGNORE_FUNCTION void InitSharpYUVNEON(void) {
|
||||
SharpYUVUpdateY = SharpYUVUpdateY_NEON;
|
||||
SharpYUVUpdateRGB = SharpYUVUpdateRGB_NEON;
|
||||
SharpYUVFilterRow = SharpYUVFilterRow_NEON;
|
||||
WEBP_TSAN_IGNORE_FUNCTION void InitSharpYuvNEON(void) {
|
||||
SharpYuvUpdateY = SharpYuvUpdateY_NEON;
|
||||
SharpYuvUpdateRGB = SharpYuvUpdateRGB_NEON;
|
||||
SharpYuvFilterRow = SharpYuvFilterRow_NEON;
|
||||
}
|
||||
|
||||
#else // !WEBP_USE_NEON
|
||||
|
||||
void InitSharpYUVNEON(void) {}
|
||||
void InitSharpYuvNEON(void) {}
|
||||
|
||||
#endif // WEBP_USE_NEON
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
extern void InitSharpYUVSSE2(void);
|
||||
extern void InitSharpYuvSSE2(void);
|
||||
|
||||
#if defined(WEBP_USE_SSE2)
|
||||
|
||||
@ -27,7 +27,7 @@ static uint16_t clip_y(int v) {
|
||||
return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)v;
|
||||
}
|
||||
|
||||
static uint64_t SharpYUVUpdateY_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];
|
||||
@ -61,7 +61,7 @@ static uint64_t SharpYUVUpdateY_SSE2(const uint16_t* ref, const uint16_t* src,
|
||||
return diff;
|
||||
}
|
||||
|
||||
static void SharpYUVUpdateRGB_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) {
|
||||
@ -78,7 +78,7 @@ static void SharpYUVUpdateRGB_SSE2(const int16_t* ref, const int16_t* src,
|
||||
}
|
||||
}
|
||||
|
||||
static void SharpYUVFilterRow_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);
|
||||
@ -129,15 +129,15 @@ static void SharpYUVFilterRow_SSE2(const int16_t* A, const int16_t* B, int len,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
extern void InitSharpYUVSSE2(void);
|
||||
extern void InitSharpYuvSSE2(void);
|
||||
|
||||
WEBP_TSAN_IGNORE_FUNCTION void InitSharpYUVSSE2(void) {
|
||||
SharpYUVUpdateY = SharpYUVUpdateY_SSE2;
|
||||
SharpYUVUpdateRGB = SharpYUVUpdateRGB_SSE2;
|
||||
SharpYUVFilterRow = SharpYUVFilterRow_SSE2;
|
||||
WEBP_TSAN_IGNORE_FUNCTION void InitSharpYuvSSE2(void) {
|
||||
SharpYuvUpdateY = SharpYuvUpdateY_SSE2;
|
||||
SharpYuvUpdateRGB = SharpYuvUpdateRGB_SSE2;
|
||||
SharpYuvFilterRow = SharpYuvFilterRow_SSE2;
|
||||
}
|
||||
#else // !WEBP_USE_SSE2
|
||||
|
||||
void InitSharpYUVSSE2(void) {}
|
||||
void InitSharpYuvSSE2(void) {}
|
||||
|
||||
#endif // WEBP_USE_SSE2
|
||||
|
Loading…
Reference in New Issue
Block a user