mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
dsp/enc*.c: rework WEBP_USE_<arch> ifdef
add a dummy init rather than repeating the '#ifdef WEBP_USE_...' pattern. Change-Id: I0cf40b500f9b3eed55a3211213db180c7c0dd43b
This commit is contained in:
parent
66de69c1fe
commit
fbdcef2401
@ -20,5 +20,5 @@
|
|||||||
|
|
||||||
extern void VP8EncDspInitAVX2(void);
|
extern void VP8EncDspInitAVX2(void);
|
||||||
|
|
||||||
void VP8EncDspInitAVX2(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitAVX2(void) {
|
||||||
}
|
}
|
||||||
|
@ -645,15 +645,12 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) {
|
|||||||
|
|
||||||
#endif // !WORK_AROUND_GCC
|
#endif // !WORK_AROUND_GCC
|
||||||
|
|
||||||
#endif // WEBP_USE_MIPS32
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Entry point
|
// Entry point
|
||||||
|
|
||||||
extern void VP8EncDspInitMIPS32(void);
|
extern void VP8EncDspInitMIPS32(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) {
|
||||||
#if defined(WEBP_USE_MIPS32)
|
|
||||||
VP8ITransform = ITransform;
|
VP8ITransform = ITransform;
|
||||||
VP8FTransform = FTransform;
|
VP8FTransform = FTransform;
|
||||||
VP8EncQuantizeBlock = QuantizeBlock;
|
VP8EncQuantizeBlock = QuantizeBlock;
|
||||||
@ -666,5 +663,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) {
|
|||||||
VP8SSE16x8 = SSE16x8;
|
VP8SSE16x8 = SSE16x8;
|
||||||
VP8SSE4x4 = SSE4x4;
|
VP8SSE4x4 = SSE4x4;
|
||||||
#endif
|
#endif
|
||||||
#endif // WEBP_USE_MIPS32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_MIPS32
|
||||||
|
|
||||||
|
extern void VP8EncDspInitMIPS32(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPS32(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_MIPS32
|
||||||
|
@ -1480,15 +1480,12 @@ static void CollectHistogram(const uint8_t* ref, const uint8_t* pred,
|
|||||||
|
|
||||||
#undef CONVERT_COEFFS_TO_BIN
|
#undef CONVERT_COEFFS_TO_BIN
|
||||||
|
|
||||||
#endif // WEBP_USE_MIPS_DSP_R2
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Entry point
|
// Entry point
|
||||||
|
|
||||||
extern void VP8EncDspInitMIPSdspR2(void);
|
extern void VP8EncDspInitMIPSdspR2(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) {
|
||||||
#if defined(WEBP_USE_MIPS_DSP_R2)
|
|
||||||
VP8FTransform = FTransform;
|
VP8FTransform = FTransform;
|
||||||
VP8ITransform = ITransform;
|
VP8ITransform = ITransform;
|
||||||
VP8TDisto4x4 = Disto4x4;
|
VP8TDisto4x4 = Disto4x4;
|
||||||
@ -1506,5 +1503,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) {
|
|||||||
VP8EncQuantize2Blocks = Quantize2Blocks;
|
VP8EncQuantize2Blocks = Quantize2Blocks;
|
||||||
VP8FTransformWHT = FTransformWHT;
|
VP8FTransformWHT = FTransformWHT;
|
||||||
VP8CollectHistogram = CollectHistogram;
|
VP8CollectHistogram = CollectHistogram;
|
||||||
#endif // WEBP_USE_MIPS_DSP_R2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_MIPS_DSP_R2
|
||||||
|
|
||||||
|
extern void VP8EncDspInitMIPSdspR2(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_MIPS_DSP_R2
|
||||||
|
@ -903,15 +903,12 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32],
|
|||||||
|
|
||||||
#endif // !WORK_AROUND_GCC
|
#endif // !WORK_AROUND_GCC
|
||||||
|
|
||||||
#endif // WEBP_USE_NEON
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Entry point
|
// Entry point
|
||||||
|
|
||||||
extern void VP8EncDspInitNEON(void);
|
extern void VP8EncDspInitNEON(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) {
|
||||||
#if defined(WEBP_USE_NEON)
|
|
||||||
VP8ITransform = ITransform;
|
VP8ITransform = ITransform;
|
||||||
VP8FTransform = FTransform;
|
VP8FTransform = FTransform;
|
||||||
|
|
||||||
@ -928,5 +925,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) {
|
|||||||
VP8EncQuantizeBlock = QuantizeBlock;
|
VP8EncQuantizeBlock = QuantizeBlock;
|
||||||
VP8EncQuantize2Blocks = Quantize2Blocks;
|
VP8EncQuantize2Blocks = Quantize2Blocks;
|
||||||
#endif
|
#endif
|
||||||
#endif // WEBP_USE_NEON
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_NEON
|
||||||
|
|
||||||
|
extern void VP8EncDspInitNEON(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_NEON
|
||||||
|
@ -914,15 +914,12 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32],
|
|||||||
return nz;
|
return nz;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // WEBP_USE_SSE2
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Entry point
|
// Entry point
|
||||||
|
|
||||||
extern void VP8EncDspInitSSE2(void);
|
extern void VP8EncDspInitSSE2(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) {
|
||||||
#if defined(WEBP_USE_SSE2)
|
|
||||||
VP8CollectHistogram = CollectHistogram;
|
VP8CollectHistogram = CollectHistogram;
|
||||||
VP8EncQuantizeBlock = QuantizeBlock;
|
VP8EncQuantizeBlock = QuantizeBlock;
|
||||||
VP8EncQuantize2Blocks = Quantize2Blocks;
|
VP8EncQuantize2Blocks = Quantize2Blocks;
|
||||||
@ -936,5 +933,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) {
|
|||||||
VP8SSE4x4 = SSE4x4;
|
VP8SSE4x4 = SSE4x4;
|
||||||
VP8TDisto4x4 = Disto4x4;
|
VP8TDisto4x4 = Disto4x4;
|
||||||
VP8TDisto16x16 = Disto16x16;
|
VP8TDisto16x16 = Disto16x16;
|
||||||
#endif // WEBP_USE_SSE2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_SSE2
|
||||||
|
|
||||||
|
extern void VP8EncDspInitSSE2(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitSSE2(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_SSE2
|
||||||
|
Loading…
Reference in New Issue
Block a user