diff --git a/src/dsp/enc_avx2.c b/src/dsp/enc_avx2.c index 372e6169..ea634e0d 100644 --- a/src/dsp/enc_avx2.c +++ b/src/dsp/enc_avx2.c @@ -20,5 +20,5 @@ extern void VP8EncDspInitAVX2(void); -void VP8EncDspInitAVX2(void) { +WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitAVX2(void) { } diff --git a/src/dsp/enc_mips32.c b/src/dsp/enc_mips32.c index 9cb2f26d..6c1e2836 100644 --- a/src/dsp/enc_mips32.c +++ b/src/dsp/enc_mips32.c @@ -645,15 +645,12 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) { #endif // !WORK_AROUND_GCC -#endif // WEBP_USE_MIPS32 - //------------------------------------------------------------------------------ // Entry point extern void VP8EncDspInitMIPS32(void); WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) { -#if defined(WEBP_USE_MIPS32) VP8ITransform = ITransform; VP8FTransform = FTransform; VP8EncQuantizeBlock = QuantizeBlock; @@ -666,5 +663,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) { VP8SSE16x8 = SSE16x8; VP8SSE4x4 = SSE4x4; #endif -#endif // WEBP_USE_MIPS32 } + +#else // !WEBP_USE_MIPS32 + +extern void VP8EncDspInitMIPS32(void); +WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) {} + +#endif // WEBP_USE_MIPS32 diff --git a/src/dsp/enc_mips_dsp_r2.c b/src/dsp/enc_mips_dsp_r2.c index 42daaf55..5eee8f35 100644 --- a/src/dsp/enc_mips_dsp_r2.c +++ b/src/dsp/enc_mips_dsp_r2.c @@ -1480,15 +1480,12 @@ static void CollectHistogram(const uint8_t* ref, const uint8_t* pred, #undef CONVERT_COEFFS_TO_BIN -#endif // WEBP_USE_MIPS_DSP_R2 - //------------------------------------------------------------------------------ // Entry point extern void VP8EncDspInitMIPSdspR2(void); WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) { -#if defined(WEBP_USE_MIPS_DSP_R2) VP8FTransform = FTransform; VP8ITransform = ITransform; VP8TDisto4x4 = Disto4x4; @@ -1506,5 +1503,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) { VP8EncQuantize2Blocks = Quantize2Blocks; VP8FTransformWHT = FTransformWHT; VP8CollectHistogram = CollectHistogram; -#endif // WEBP_USE_MIPS_DSP_R2 } + +#else // !WEBP_USE_MIPS_DSP_R2 + +extern void VP8EncDspInitMIPSdspR2(void); +WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) {} + +#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/src/dsp/enc_neon.c b/src/dsp/enc_neon.c index 36f26946..177ad534 100644 --- a/src/dsp/enc_neon.c +++ b/src/dsp/enc_neon.c @@ -903,15 +903,12 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], #endif // !WORK_AROUND_GCC -#endif // WEBP_USE_NEON - //------------------------------------------------------------------------------ // Entry point extern void VP8EncDspInitNEON(void); WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) { -#if defined(WEBP_USE_NEON) VP8ITransform = ITransform; VP8FTransform = FTransform; @@ -928,5 +925,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) { VP8EncQuantizeBlock = QuantizeBlock; VP8EncQuantize2Blocks = Quantize2Blocks; #endif -#endif // WEBP_USE_NEON } + +#else // !WEBP_USE_NEON + +extern void VP8EncDspInitNEON(void); +WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) {} + +#endif // WEBP_USE_NEON diff --git a/src/dsp/enc_sse2.c b/src/dsp/enc_sse2.c index b1b50f48..6b71036a 100644 --- a/src/dsp/enc_sse2.c +++ b/src/dsp/enc_sse2.c @@ -914,15 +914,12 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], return nz; } -#endif // WEBP_USE_SSE2 - //------------------------------------------------------------------------------ // Entry point extern void VP8EncDspInitSSE2(void); WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) { -#if defined(WEBP_USE_SSE2) VP8CollectHistogram = CollectHistogram; VP8EncQuantizeBlock = QuantizeBlock; VP8EncQuantize2Blocks = Quantize2Blocks; @@ -936,5 +933,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) { VP8SSE4x4 = SSE4x4; VP8TDisto4x4 = Disto4x4; VP8TDisto16x16 = Disto16x16; -#endif // WEBP_USE_SSE2 } + +#else // !WEBP_USE_SSE2 + +extern void VP8EncDspInitSSE2(void); +WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) {} + +#endif // WEBP_USE_SSE2