diff --git a/src/dsp/alpha_processing_mips_dsp_r2.c b/src/dsp/alpha_processing_mips_dsp_r2.c index 186e9e03..e5644998 100644 --- a/src/dsp/alpha_processing_mips_dsp_r2.c +++ b/src/dsp/alpha_processing_mips_dsp_r2.c @@ -124,16 +124,19 @@ static void MultARGBRow(uint32_t* const ptr, int width, int inverse) { } } -#endif // WEBP_USE_MIPS_DSP_R2 - //------------------------------------------------------------------------------ -// Init function +// Entry point extern void WebPInitAlphaProcessingMIPSdspR2(void); WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingMIPSdspR2(void) { -#if defined(WEBP_USE_MIPS_DSP_R2) WebPDispatchAlpha = DispatchAlpha; WebPMultARGBRow = MultARGBRow; -#endif } + +#else // !WEBP_USE_MIPS_DSP_R2 + +extern void WebPInitAlphaProcessingMIPSdspR2(void); +WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingMIPSdspR2(void) {} + +#endif // WEBP_USE_MIPS_DSP_R2 diff --git a/src/dsp/alpha_processing_sse2.c b/src/dsp/alpha_processing_sse2.c index 9233246c..40501303 100644 --- a/src/dsp/alpha_processing_sse2.c +++ b/src/dsp/alpha_processing_sse2.c @@ -277,20 +277,23 @@ static void MultRow(uint8_t* const ptr, const uint8_t* const alpha, if (width > 0) WebPMultRowC(ptr + x, alpha + x, width, inverse); } -#endif // WEBP_USE_SSE2 - //------------------------------------------------------------------------------ -// Init function +// Entry point extern void WebPInitAlphaProcessingSSE2(void); WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingSSE2(void) { -#if defined(WEBP_USE_SSE2) WebPMultARGBRow = MultARGBRow; WebPMultRow = MultRow; WebPApplyAlphaMultiply = ApplyAlphaMultiply; WebPDispatchAlpha = DispatchAlpha; WebPDispatchAlphaToGreen = DispatchAlphaToGreen; WebPExtractAlpha = ExtractAlpha; -#endif } + +#else // !WEBP_USE_SSE2 + +extern void WebPInitAlphaProcessingSSE2(void); +WEBP_TSAN_IGNORE_FUNCTION void WebPInitAlphaProcessingSSE2(void) {} + +#endif // WEBP_USE_SSE2