mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
dsp/filters*.c: rework WEBP_USE_<arch> ifdef
add a dummy init rather than repeating the '#ifdef WEBP_USE_...' pattern. Change-Id: Idf08ffeb2aef1392a6d69596d897a59deebb64cf
This commit is contained in:
parent
fbdcef2401
commit
73805ff270
@ -383,14 +383,12 @@ static void GradientUnfilter(int width, int height, int stride, int row,
|
|||||||
#undef DO_PREDICT_LINE
|
#undef DO_PREDICT_LINE
|
||||||
#undef SANITY_CHECK
|
#undef SANITY_CHECK
|
||||||
|
|
||||||
#endif // WEBP_USE_MIPS_DSP_R2
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
// Entry point
|
||||||
|
|
||||||
extern void VP8FiltersInitMIPSdspR2(void);
|
extern void VP8FiltersInitMIPSdspR2(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitMIPSdspR2(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitMIPSdspR2(void) {
|
||||||
#if defined(WEBP_USE_MIPS_DSP_R2)
|
|
||||||
WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter;
|
WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter;
|
||||||
WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter;
|
WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter;
|
||||||
WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter;
|
WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter;
|
||||||
@ -398,7 +396,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitMIPSdspR2(void) {
|
|||||||
WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter;
|
WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter;
|
||||||
WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter;
|
WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter;
|
||||||
WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter;
|
WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter;
|
||||||
#endif // WEBP_USE_MIPS_DSP_R2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
#else // !WEBP_USE_MIPS_DSP_R2
|
||||||
|
|
||||||
|
extern void VP8FiltersInitMIPSdspR2(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitMIPSdspR2(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_MIPS_DSP_R2
|
||||||
|
@ -331,13 +331,11 @@ static void GradientUnfilter(int width, int height, int stride, int row,
|
|||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
// Entry point
|
||||||
#endif // WEBP_USE_SSE2
|
|
||||||
|
|
||||||
extern void VP8FiltersInitSSE2(void);
|
extern void VP8FiltersInitSSE2(void);
|
||||||
|
|
||||||
WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitSSE2(void) {
|
WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitSSE2(void) {
|
||||||
#if defined(WEBP_USE_SSE2)
|
|
||||||
WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter;
|
WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter;
|
||||||
WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter;
|
WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter;
|
||||||
WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter;
|
WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter;
|
||||||
@ -345,5 +343,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitSSE2(void) {
|
|||||||
WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter;
|
WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter;
|
||||||
WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter;
|
WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter;
|
||||||
WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter;
|
WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // !WEBP_USE_SSE2
|
||||||
|
|
||||||
|
extern void VP8FiltersInitSSE2(void);
|
||||||
|
WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitSSE2(void) {}
|
||||||
|
|
||||||
|
#endif // WEBP_USE_SSE2
|
||||||
|
Loading…
Reference in New Issue
Block a user