mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
dsp/yuv*.c: rework WEBP_USE_<arch> ifdef
add a dummy init rather than repeating the '#ifdef WEBP_USE_...' pattern. Change-Id: I42e621481be7305bb7c426b4d0b279619195611e
This commit is contained in:
parent
6584d398eb
commit
cecf509662
@ -84,17 +84,21 @@ ROW_FUNC(YuvToBgraRow, 4, 2, 1, 0, 3)
|
|||||||
|
|
||||||
#undef ROW_FUNC
|
#undef ROW_FUNC
|
||||||
|
|
||||||
#endif // WEBP_USE_MIPS32
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
// Entry point
|
||||||
|
|
||||||
extern void WebPInitSamplersMIPS32(void);
|
extern void WebPInitSamplersMIPS32(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPS32(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPS32(void) {
|
||||||
#if defined(WEBP_USE_MIPS32)
|
|
||||||
WebPSamplers[MODE_RGB] = YuvToRgbRow;
|
WebPSamplers[MODE_RGB] = YuvToRgbRow;
|
||||||
WebPSamplers[MODE_RGBA] = YuvToRgbaRow;
|
WebPSamplers[MODE_RGBA] = YuvToRgbaRow;
|
||||||
WebPSamplers[MODE_BGR] = YuvToBgrRow;
|
WebPSamplers[MODE_BGR] = YuvToBgrRow;
|
||||||
WebPSamplers[MODE_BGRA] = YuvToBgraRow;
|
WebPSamplers[MODE_BGRA] = YuvToBgraRow;
|
||||||
#endif // WEBP_USE_MIPS32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_MIPS32
|
||||||
|
|
||||||
|
extern void WebPInitSamplersMIPS32(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPS32(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_MIPS32
|
||||||
|
@ -115,17 +115,21 @@ ROW_FUNC(YuvToBgraRow, 4, 2, 1, 0, 3)
|
|||||||
#undef ROW_FUNC_PART_2
|
#undef ROW_FUNC_PART_2
|
||||||
#undef ROW_FUNC_PART_1
|
#undef ROW_FUNC_PART_1
|
||||||
|
|
||||||
#endif // WEBP_USE_MIPS_DSP_R2
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
// Entry point
|
||||||
|
|
||||||
extern void WebPInitSamplersMIPSdspR2(void);
|
extern void WebPInitSamplersMIPSdspR2(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPSdspR2(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPSdspR2(void) {
|
||||||
#if defined(WEBP_USE_MIPS_DSP_R2)
|
|
||||||
WebPSamplers[MODE_RGB] = YuvToRgbRow;
|
WebPSamplers[MODE_RGB] = YuvToRgbRow;
|
||||||
WebPSamplers[MODE_RGBA] = YuvToRgbaRow;
|
WebPSamplers[MODE_RGBA] = YuvToRgbaRow;
|
||||||
WebPSamplers[MODE_BGR] = YuvToBgrRow;
|
WebPSamplers[MODE_BGR] = YuvToBgrRow;
|
||||||
WebPSamplers[MODE_BGRA] = YuvToBgraRow;
|
WebPSamplers[MODE_BGRA] = YuvToBgraRow;
|
||||||
#endif // WEBP_USE_MIPS_DSP_R2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_MIPS_DSP_R2
|
||||||
|
|
||||||
|
extern void WebPInitSamplersMIPSdspR2(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPSdspR2(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_MIPS_DSP_R2
|
||||||
|
@ -304,19 +304,22 @@ static void YuvToBgrRowSSE2(const uint8_t* y,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // WEBP_USE_SSE2
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Entry point
|
// Entry point
|
||||||
|
|
||||||
extern void WebPInitSamplersSSE2(void);
|
extern void WebPInitSamplersSSE2(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersSSE2(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersSSE2(void) {
|
||||||
#if defined(WEBP_USE_SSE2)
|
|
||||||
WebPSamplers[MODE_RGB] = YuvToRgbRowSSE2;
|
WebPSamplers[MODE_RGB] = YuvToRgbRowSSE2;
|
||||||
WebPSamplers[MODE_RGBA] = YuvToRgbaRowSSE2;
|
WebPSamplers[MODE_RGBA] = YuvToRgbaRowSSE2;
|
||||||
WebPSamplers[MODE_BGR] = YuvToBgrRowSSE2;
|
WebPSamplers[MODE_BGR] = YuvToBgrRowSSE2;
|
||||||
WebPSamplers[MODE_BGRA] = YuvToBgraRowSSE2;
|
WebPSamplers[MODE_BGRA] = YuvToBgraRowSSE2;
|
||||||
WebPSamplers[MODE_ARGB] = YuvToArgbRowSSE2;
|
WebPSamplers[MODE_ARGB] = YuvToArgbRowSSE2;
|
||||||
#endif // WEBP_USE_SSE2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_SSE2
|
||||||
|
|
||||||
|
extern void WebPInitSamplersSSE2(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersSSE2(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_SSE2
|
||||||
|
Loading…
Reference in New Issue
Block a user