mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
Merge "configure: set WEBP_HAVE_AVX2 when available"
This commit is contained in:
@ -14,6 +14,10 @@
|
||||
#ifndef WEBP_DSP_DSP_H_
|
||||
#define WEBP_DSP_DSP_H_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../webp/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -40,7 +44,7 @@ extern "C" {
|
||||
#define WEBP_USE_SSE2
|
||||
#endif
|
||||
|
||||
#if defined(__AVX2__)
|
||||
#if defined(__AVX2__) || defined(WEBP_HAVE_AVX2)
|
||||
#define WEBP_USE_AVX2
|
||||
#endif
|
||||
|
||||
|
@ -720,17 +720,18 @@ void VP8EncDspInit(void) {
|
||||
if (VP8GetCPUInfo(kSSE2)) {
|
||||
VP8EncDspInitSSE2();
|
||||
}
|
||||
// TODO(jzern): this should be conditionally included based on a configure
|
||||
// (HAVE_AVX2) define. We can't use WEBP_USE_AVX2/__AVX2__ here as -mavx2
|
||||
// won't be defined for this file.
|
||||
#endif
|
||||
#if defined(WEBP_USE_AVX2)
|
||||
if (VP8GetCPUInfo(kAVX2)) {
|
||||
VP8EncDspInitAVX2();
|
||||
}
|
||||
#elif defined(WEBP_USE_NEON)
|
||||
#endif
|
||||
#if defined(WEBP_USE_NEON)
|
||||
if (VP8GetCPUInfo(kNEON)) {
|
||||
VP8EncDspInitNEON();
|
||||
}
|
||||
#elif defined(WEBP_USE_MIPS32)
|
||||
#endif
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
if (VP8GetCPUInfo(kMIPS32)) {
|
||||
VP8EncDspInitMIPS32();
|
||||
}
|
||||
|
Reference in New Issue
Block a user