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

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

Change-Id: I46b89909a0279172d37dbda70f731c7b9f052dad
This commit is contained in:
James Zern 2015-03-19 20:32:15 -07:00
parent 80ff38130e
commit 29fd6f90c0
2 changed files with 16 additions and 7 deletions

View File

@ -93,16 +93,19 @@ static void PackRGB(const uint8_t* r, const uint8_t* g, const uint8_t* b,
); );
} }
#endif // WEBP_USE_MIPS_DSP_R2
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Entry point // Entry point
extern void VP8EncDspARGBInitMIPSdspR2(void); extern void VP8EncDspARGBInitMIPSdspR2(void);
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInitMIPSdspR2(void) { WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInitMIPSdspR2(void) {
#if defined(WEBP_USE_MIPS_DSP_R2)
VP8PackARGB = PackARGB; VP8PackARGB = PackARGB;
VP8PackRGB = PackRGB; VP8PackRGB = PackRGB;
#endif // WEBP_USE_MIPS_DSP_R2
} }
#else // !WEBP_USE_MIPS_DSP_R2
extern void VP8EncDspARGBInitMIPSdspR2(void);
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInitMIPSdspR2(void) {}
#endif // WEBP_USE_MIPS_DSP_R2

View File

@ -51,12 +51,18 @@ static void PackARGB(const uint8_t* a, const uint8_t* r, const uint8_t* g,
} }
} }
#endif // WEBP_USE_SSE2 //------------------------------------------------------------------------------
// Entry point
extern void VP8EncDspARGBInitSSE2(void); extern void VP8EncDspARGBInitSSE2(void);
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInitSSE2(void) { WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInitSSE2(void) {
#if defined(WEBP_USE_SSE2)
VP8PackARGB = PackARGB; VP8PackARGB = PackARGB;
#endif
} }
#else // !WEBP_USE_SSE2
extern void VP8EncDspARGBInitSSE2(void);
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspARGBInitSSE2(void) {}
#endif // WEBP_USE_SSE2