mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 21:28:22 +01:00
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:
parent
29fd6f90c0
commit
48e4ffd15e
@ -137,18 +137,19 @@ static void SetResidualCoeffs(const int16_t* const coeffs,
|
||||
res->coeffs = coeffs;
|
||||
}
|
||||
|
||||
#endif // WEBP_USE_MIPS32
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Entry point
|
||||
|
||||
extern void VP8EncDspCostInitMIPS32(void);
|
||||
|
||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPS32(void) {
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
VP8GetResidualCost = GetResidualCost;
|
||||
VP8SetResidualCoeffs = SetResidualCoeffs;
|
||||
#endif // WEBP_USE_MIPS32
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#else // !WEBP_USE_MIPS32
|
||||
|
||||
extern void VP8EncDspCostInitMIPS32(void);
|
||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPS32(void) {}
|
||||
|
||||
#endif // WEBP_USE_MIPS32
|
||||
|
@ -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
|
||||
|
@ -106,7 +106,6 @@ static int GetResidualCostSSE2(int ctx0, const VP8Residual* const res) {
|
||||
}
|
||||
return cost;
|
||||
}
|
||||
#endif // WEBP_USE_SSE2
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Entry point
|
||||
@ -114,8 +113,13 @@ static int GetResidualCostSSE2(int ctx0, const VP8Residual* const res) {
|
||||
extern void VP8EncDspCostInitSSE2(void);
|
||||
|
||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitSSE2(void) {
|
||||
#if defined(WEBP_USE_SSE2)
|
||||
VP8SetResidualCoeffs = SetResidualCoeffsSSE2;
|
||||
VP8GetResidualCost = GetResidualCostSSE2;
|
||||
#endif // WEBP_USE_SSE2
|
||||
}
|
||||
|
||||
#else // !WEBP_USE_SSE2
|
||||
|
||||
extern void VP8EncDspCostInitSSE2(void);
|
||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitSSE2(void) {}
|
||||
|
||||
#endif // WEBP_USE_SSE2
|
||||
|
Loading…
Reference in New Issue
Block a user