Rename SharpYUV to SharpYuv for consistency.

Change-Id: I21df96b4c8f8fa97bfd2ac9c806c7e5119b55691
This commit is contained in:
Maryla 2022-04-11 11:55:10 +02:00
parent 40e8aa57f8
commit 8fa053d134
5 changed files with 42 additions and 42 deletions

View File

@ -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]); out1[0] = Filter2(cur_uv[0], prev_uv[0], best_y[0]);
out2[0] = Filter2(cur_uv[0], next_uv[0], best_y[w]); 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, prev_uv, len, best_y + 0 + 1, out1 + 1);
SharpYUVFilterRow(cur_uv, next_uv, len, best_y + w + 1, out2 + 1); SharpYuvFilterRow(cur_uv, next_uv, len, best_y + w + 1, out2 + 1);
// special boundary case for i == w - 1 when w is even // special boundary case for i == w - 1 when w is even
if (!(w & 1)) { 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); UpdateChroma(src1, src2, best_rgb_uv, uv_w);
// update two rows of Y and one row of RGB // update two rows of Y and one row of RGB
diff_y_sum += SharpYUVUpdateY(target_y, best_rgb_y, best_y, 2 * 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); SharpYuvUpdateRGB(target_uv, best_rgb_uv, best_uv, 3 * uv_w);
best_y += 2 * w; best_y += 2 * w;
best_uv += 3 * uv_w; best_uv += 3 * uv_w;

View File

@ -26,7 +26,7 @@ static uint16_t clip_y(int v) {
return (v < 0) ? 0 : (v > MAX_Y) ? MAX_Y : (uint16_t)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) { uint16_t* dst, int len) {
uint64_t diff = 0; uint64_t diff = 0;
int i; int i;
@ -39,7 +39,7 @@ static uint64_t SharpYUVUpdateY_C(const uint16_t* ref, const uint16_t* src,
return diff; 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) { int16_t* dst, int len) {
int i; int i;
for (i = 0; i < len; ++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) { const uint16_t* best_y, uint16_t* out) {
int i; int i;
for (i = 0; i < len; ++i, ++A, ++B) { 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); 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); 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); const uint16_t* best_y, uint16_t* out);
extern void InitSharpYUVSSE2(void); extern void InitSharpYuvSSE2(void);
extern void InitSharpYUVNEON(void); extern void InitSharpYuvNEON(void);
void SharpYuvInitDsp(VP8CPUInfo cpu_info_func) { void SharpYuvInitDsp(VP8CPUInfo cpu_info_func) {
(void)cpu_info_func; (void)cpu_info_func;
#if !WEBP_NEON_OMIT_C_CODE #if !WEBP_NEON_OMIT_C_CODE
SharpYUVUpdateY = SharpYUVUpdateY_C; SharpYuvUpdateY = SharpYuvUpdateY_C;
SharpYUVUpdateRGB = SharpYUVUpdateRGB_C; SharpYuvUpdateRGB = SharpYuvUpdateRGB_C;
SharpYUVFilterRow = SharpYUVFilterRow_C; SharpYuvFilterRow = SharpYuvFilterRow_C;
#endif #endif
#if defined(WEBP_HAVE_SSE2) #if defined(WEBP_HAVE_SSE2)
if (cpu_info_func == NULL || cpu_info_func(kSSE2)) { if (cpu_info_func == NULL || cpu_info_func(kSSE2)) {
InitSharpYUVSSE2(); InitSharpYuvSSE2();
} }
#endif // WEBP_HAVE_SSE2 #endif // WEBP_HAVE_SSE2
#if defined(WEBP_HAVE_NEON) #if defined(WEBP_HAVE_NEON)
if (WEBP_NEON_OMIT_C_CODE || cpu_info_func == NULL || cpu_info_func(kNEON)) { if (WEBP_NEON_OMIT_C_CODE || cpu_info_func == NULL || cpu_info_func(kNEON)) {
InitSharpYUVNEON(); InitSharpYuvNEON();
} }
#endif // WEBP_HAVE_NEON #endif // WEBP_HAVE_NEON
assert(SharpYUVUpdateY != NULL); assert(SharpYuvUpdateY != NULL);
assert(SharpYUVUpdateRGB != NULL); assert(SharpYuvUpdateRGB != NULL);
assert(SharpYUVFilterRow != NULL); assert(SharpYuvFilterRow != NULL);
} }

View File

@ -16,11 +16,11 @@
#include "src/dsp/cpu.h" #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); 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); 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); const uint16_t* best_y, uint16_t* out);
void SharpYuvInitDsp(VP8CPUInfo cpu_info_func); void SharpYuvInitDsp(VP8CPUInfo cpu_info_func);

View File

@ -19,7 +19,7 @@
#include <arm_neon.h> #include <arm_neon.h>
#endif #endif
extern void InitSharpYUVNEON(void); extern void InitSharpYuvNEON(void);
#if defined(WEBP_USE_NEON) #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; 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) { uint16_t* dst, int len) {
int i; int i;
const int16x8_t zero = vdupq_n_s16(0); 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; 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) { int16_t* dst, int len) {
int i; int i;
for (i = 0; i + 8 <= len; i += 8) { 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) { const uint16_t* best_y, uint16_t* out) {
int i; int i;
const int16x8_t max = vdupq_n_s16(MAX_Y); 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) { WEBP_TSAN_IGNORE_FUNCTION void InitSharpYuvNEON(void) {
SharpYUVUpdateY = SharpYUVUpdateY_NEON; SharpYuvUpdateY = SharpYuvUpdateY_NEON;
SharpYUVUpdateRGB = SharpYUVUpdateRGB_NEON; SharpYuvUpdateRGB = SharpYuvUpdateRGB_NEON;
SharpYUVFilterRow = SharpYUVFilterRow_NEON; SharpYuvFilterRow = SharpYuvFilterRow_NEON;
} }
#else // !WEBP_USE_NEON #else // !WEBP_USE_NEON
void InitSharpYUVNEON(void) {} void InitSharpYuvNEON(void) {}
#endif // WEBP_USE_NEON #endif // WEBP_USE_NEON

View File

@ -18,7 +18,7 @@
#include <emmintrin.h> #include <emmintrin.h>
#endif #endif
extern void InitSharpYUVSSE2(void); extern void InitSharpYuvSSE2(void);
#if defined(WEBP_USE_SSE2) #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; 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) { uint16_t* dst, int len) {
uint64_t diff = 0; uint64_t diff = 0;
uint32_t tmp[4]; uint32_t tmp[4];
@ -61,7 +61,7 @@ static uint64_t SharpYUVUpdateY_SSE2(const uint16_t* ref, const uint16_t* src,
return diff; 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) { int16_t* dst, int len) {
int i = 0; int i = 0;
for (i = 0; i + 8 <= len; i += 8) { 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) { const uint16_t* best_y, uint16_t* out) {
int i; int i;
const __m128i kCst8 = _mm_set1_epi16(8); 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) { WEBP_TSAN_IGNORE_FUNCTION void InitSharpYuvSSE2(void) {
SharpYUVUpdateY = SharpYUVUpdateY_SSE2; SharpYuvUpdateY = SharpYuvUpdateY_SSE2;
SharpYUVUpdateRGB = SharpYUVUpdateRGB_SSE2; SharpYuvUpdateRGB = SharpYuvUpdateRGB_SSE2;
SharpYUVFilterRow = SharpYUVFilterRow_SSE2; SharpYuvFilterRow = SharpYuvFilterRow_SSE2;
} }
#else // !WEBP_USE_SSE2 #else // !WEBP_USE_SSE2
void InitSharpYUVSSE2(void) {} void InitSharpYuvSSE2(void) {}
#endif // WEBP_USE_SSE2 #endif // WEBP_USE_SSE2