From cad0d5adb6de76487139d09fdcdde74b0c1e9984 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 11 Aug 2022 17:48:11 -0700 Subject: [PATCH] sharyuv_{neon,sse2}.c: merge WEBP_USE_* sections Change-Id: I686e6740717902d632fb01f9151e47fd3cb2cf79 --- sharpyuv/sharpyuv_neon.c | 9 ++++----- sharpyuv/sharpyuv_sse2.c | 7 ++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sharpyuv/sharpyuv_neon.c b/sharpyuv/sharpyuv_neon.c index 5cf6aaff..58409148 100644 --- a/sharpyuv/sharpyuv_neon.c +++ b/sharpyuv/sharpyuv_neon.c @@ -17,11 +17,6 @@ #include #include #include -#endif - -extern void InitSharpYuvNEON(void); - -#if defined(WEBP_USE_NEON) static uint16_t clip_NEON(int v, int max) { 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) { SharpYuvUpdateY = SharpYuvUpdateY_NEON; SharpYuvUpdateRGB = SharpYuvUpdateRGB_NEON; @@ -177,6 +174,8 @@ WEBP_TSAN_IGNORE_FUNCTION void InitSharpYuvNEON(void) { #else // !WEBP_USE_NEON +extern void InitSharpYuvNEON(void); + void InitSharpYuvNEON(void) {} #endif // WEBP_USE_NEON diff --git a/sharpyuv/sharpyuv_sse2.c b/sharpyuv/sharpyuv_sse2.c index 19438737..9744d1bb 100644 --- a/sharpyuv/sharpyuv_sse2.c +++ b/sharpyuv/sharpyuv_sse2.c @@ -16,11 +16,6 @@ #if defined(WEBP_USE_SSE2) #include #include -#endif - -extern void InitSharpYuvSSE2(void); - -#if defined(WEBP_USE_SSE2) static uint16_t clip_SSE2(int v, int max) { 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 +extern void InitSharpYuvSSE2(void); + void InitSharpYuvSSE2(void) {} #endif // WEBP_USE_SSE2