mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
dsp/*: use WEBP_HAVE_* to determine Init availability
after:ece18e55
dsp.h: respect --disable-sse2/sse4.1/neon WEBP_USE_* will be set when a module is targeting a particular instruction set, e.g., sse4.1, and not overridden if WEBP_HAVE_SSE41 is set, as previously this would ignore the case where the instruction set was disabled via config.h and the HAVE macro was unset. dsp.h not ensures WEBP_HAVE_* are set when WEBP_USE_* to cover cases where the files are built without config.h. Change-Id: Ia1c2dcf4100cc1081d968acb6e085e2a1768ece6 (cherry picked from commit1fe3162541
)
This commit is contained in:
@ -453,10 +453,10 @@ WEBP_DSP_INIT_FUNC(WebPInitAlphaProcessing) {
|
||||
|
||||
// If defined, use CPUInfo() to overwrite some pointers with faster versions.
|
||||
if (VP8GetCPUInfo != NULL) {
|
||||
#if defined(WEBP_USE_SSE2)
|
||||
#if defined(WEBP_HAVE_SSE2)
|
||||
if (VP8GetCPUInfo(kSSE2)) {
|
||||
WebPInitAlphaProcessingSSE2();
|
||||
#if defined(WEBP_USE_SSE41)
|
||||
#if defined(WEBP_HAVE_SSE41)
|
||||
if (VP8GetCPUInfo(kSSE4_1)) {
|
||||
WebPInitAlphaProcessingSSE41();
|
||||
}
|
||||
@ -470,7 +470,7 @@ WEBP_DSP_INIT_FUNC(WebPInitAlphaProcessing) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(WEBP_USE_NEON)
|
||||
#if defined(WEBP_HAVE_NEON)
|
||||
if (WEBP_NEON_OMIT_C_CODE ||
|
||||
(VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) {
|
||||
WebPInitAlphaProcessingNEON();
|
||||
|
Reference in New Issue
Block a user