summaryrefslogtreecommitdiff
path: root/thirdparty/libwebp/sharpyuv/sharpyuv_dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/libwebp/sharpyuv/sharpyuv_dsp.c')
-rw-r--r--thirdparty/libwebp/sharpyuv/sharpyuv_dsp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/thirdparty/libwebp/sharpyuv/sharpyuv_dsp.c b/thirdparty/libwebp/sharpyuv/sharpyuv_dsp.c
index 956fa7ce55..31c272c408 100644
--- a/thirdparty/libwebp/sharpyuv/sharpyuv_dsp.c
+++ b/thirdparty/libwebp/sharpyuv/sharpyuv_dsp.c
@@ -16,7 +16,7 @@
#include <assert.h>
#include <stdlib.h>
-#include "src/dsp/cpu.h"
+#include "sharpyuv/sharpyuv_cpu.h"
//-----------------------------------------------------------------------------
@@ -75,23 +75,24 @@ void (*SharpYuvFilterRow)(const int16_t* A, const int16_t* B, int len,
extern void InitSharpYuvSSE2(void);
extern void InitSharpYuvNEON(void);
-void SharpYuvInitDsp(VP8CPUInfo cpu_info_func) {
- (void)cpu_info_func;
-
+void SharpYuvInitDsp(void) {
#if !WEBP_NEON_OMIT_C_CODE
SharpYuvUpdateY = SharpYuvUpdateY_C;
SharpYuvUpdateRGB = SharpYuvUpdateRGB_C;
SharpYuvFilterRow = SharpYuvFilterRow_C;
#endif
+ if (SharpYuvGetCPUInfo != NULL) {
#if defined(WEBP_HAVE_SSE2)
- if (cpu_info_func == NULL || cpu_info_func(kSSE2)) {
- InitSharpYuvSSE2();
- }
+ if (SharpYuvGetCPUInfo(kSSE2)) {
+ InitSharpYuvSSE2();
+ }
#endif // WEBP_HAVE_SSE2
+ }
#if defined(WEBP_HAVE_NEON)
- if (WEBP_NEON_OMIT_C_CODE || cpu_info_func == NULL || cpu_info_func(kNEON)) {
+ if (WEBP_NEON_OMIT_C_CODE ||
+ (SharpYuvGetCPUInfo != NULL && SharpYuvGetCPUInfo(kNEON))) {
InitSharpYuvNEON();
}
#endif // WEBP_HAVE_NEON