dsp/alpha*.c: rework WEBP_USE_<arch> ifdef

add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.

Change-Id: I9e7f187daffe1a3b1bc92953dce980c38d1a6269
This commit is contained in:
James Zern
2015-03-18 22:52:39 -07:00
parent e9570dd987
commit 80ff38130e
2 changed files with 16 additions and 10 deletions

View File

@ -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