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

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

Change-Id: Ie9bee5eaf9daebe0909ab1dda1cf1aa4ee1ef03e
This commit is contained in:
James Zern
2015-03-19 20:35:00 -07:00
parent 29fd6f90c0
commit 48e4ffd15e
3 changed files with 19 additions and 13 deletions

View File

@ -91,17 +91,18 @@ static int GetResidualCost(int ctx0, const VP8Residual* const res) {
return cost;
}
#endif // WEBP_USE_MIPS_DSP_R2
//------------------------------------------------------------------------------
// Entry point
extern void VP8EncDspCostInitMIPSdspR2(void);
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPSdspR2(void) {
#if defined(WEBP_USE_MIPS_DSP_R2)
VP8GetResidualCost = GetResidualCost;
#endif // WEBP_USE_MIPS_DSP_R2
}
//------------------------------------------------------------------------------
#else // !WEBP_USE_MIPS_DSP_R2
extern void VP8EncDspCostInitMIPSdspR2(void);
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPSdspR2(void) {}
#endif // WEBP_USE_MIPS_DSP_R2