sharyuv_{neon,sse2}.c: merge WEBP_USE_* sections

Change-Id: I686e6740717902d632fb01f9151e47fd3cb2cf79
This commit is contained in:
James Zern 2022-08-11 17:48:11 -07:00
parent ef70ee06fa
commit cad0d5adb6
2 changed files with 6 additions and 10 deletions

View File

@ -17,11 +17,6 @@
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <arm_neon.h> #include <arm_neon.h>
#endif
extern void InitSharpYuvNEON(void);
#if defined(WEBP_USE_NEON)
static uint16_t clip_NEON(int v, int max) { static uint16_t clip_NEON(int v, int max) {
return (v < 0) ? 0 : (v > max) ? max : (uint16_t)v; return (v < 0) ? 0 : (v > max) ? max : (uint16_t)v;
@ -169,6 +164,8 @@ static void SharpYuvFilterRow_NEON(const int16_t* A, const int16_t* B, int len,
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
extern void InitSharpYuvNEON(void);
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;
@ -177,6 +174,8 @@ WEBP_TSAN_IGNORE_FUNCTION void InitSharpYuvNEON(void) {
#else // !WEBP_USE_NEON #else // !WEBP_USE_NEON
extern void InitSharpYuvNEON(void);
void InitSharpYuvNEON(void) {} void InitSharpYuvNEON(void) {}
#endif // WEBP_USE_NEON #endif // WEBP_USE_NEON

View File

@ -16,11 +16,6 @@
#if defined(WEBP_USE_SSE2) #if defined(WEBP_USE_SSE2)
#include <stdlib.h> #include <stdlib.h>
#include <emmintrin.h> #include <emmintrin.h>
#endif
extern void InitSharpYuvSSE2(void);
#if defined(WEBP_USE_SSE2)
static uint16_t clip_SSE2(int v, int max) { static uint16_t clip_SSE2(int v, int max) {
return (v < 0) ? 0 : (v > max) ? max : (uint16_t)v; return (v < 0) ? 0 : (v > max) ? max : (uint16_t)v;
@ -199,6 +194,8 @@ WEBP_TSAN_IGNORE_FUNCTION void InitSharpYuvSSE2(void) {
} }
#else // !WEBP_USE_SSE2 #else // !WEBP_USE_SSE2
extern void InitSharpYuvSSE2(void);
void InitSharpYuvSSE2(void) {} void InitSharpYuvSSE2(void) {}
#endif // WEBP_USE_SSE2 #endif // WEBP_USE_SSE2