mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
add SSE2 variants for alpha filtering functions
The 'inverse' variants are harder to parallelize, since the result of filtering is used for prediction. The 'direct' way is relatively easier. The heavy bottleneck left for optimization is still GradientUnfilter() Change-Id: I358008f492a887e8fff6600cb27857b18dee86e9
This commit is contained in:
@ -206,6 +206,7 @@ WebPFilterFunc WebPFilters[WEBP_FILTER_LAST];
|
||||
WebPUnfilterFunc WebPUnfilters[WEBP_FILTER_LAST];
|
||||
|
||||
extern void VP8FiltersInitMIPSdspR2(void);
|
||||
extern void VP8FiltersInitSSE2(void);
|
||||
|
||||
static volatile VP8CPUInfo filters_last_cpuinfo_used =
|
||||
(VP8CPUInfo)&filters_last_cpuinfo_used;
|
||||
@ -224,6 +225,11 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInit(void) {
|
||||
WebPFilters[WEBP_FILTER_GRADIENT] = GradientFilter;
|
||||
|
||||
if (VP8GetCPUInfo != NULL) {
|
||||
#if defined(WEBP_USE_SSE2)
|
||||
if (VP8GetCPUInfo(kSSE2)) {
|
||||
VP8FiltersInitSSE2();
|
||||
}
|
||||
#endif
|
||||
#if defined(WEBP_USE_MIPS_DSP_R2)
|
||||
if (VP8GetCPUInfo(kMIPSdspR2)) {
|
||||
VP8FiltersInitMIPSdspR2();
|
||||
|
Reference in New Issue
Block a user