Merge "add missing USE_{MSA,NEON} checks in headers" into main

This commit is contained in:
James Zern 2021-12-14 23:39:18 +00:00 committed by Gerrit Code Review
commit 5b7e79303a
2 changed files with 10 additions and 2 deletions

View File

@ -14,6 +14,10 @@
#ifndef WEBP_DSP_MSA_MACRO_H_ #ifndef WEBP_DSP_MSA_MACRO_H_
#define WEBP_DSP_MSA_MACRO_H_ #define WEBP_DSP_MSA_MACRO_H_
#include "src/dsp/dsp.h"
#if defined(WEBP_USE_MSA)
#include <stdint.h> #include <stdint.h>
#include <msa.h> #include <msa.h>
@ -1389,4 +1393,5 @@ static WEBP_INLINE uint32_t func_hadd_uh_u32(v8u16 in) {
} while (0) } while (0)
#define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__) #define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__)
#endif // WEBP_USE_MSA
#endif // WEBP_DSP_MSA_MACRO_H_ #endif // WEBP_DSP_MSA_MACRO_H_

View File

@ -12,10 +12,12 @@
#ifndef WEBP_DSP_NEON_H_ #ifndef WEBP_DSP_NEON_H_
#define WEBP_DSP_NEON_H_ #define WEBP_DSP_NEON_H_
#include <arm_neon.h>
#include "src/dsp/dsp.h" #include "src/dsp/dsp.h"
#if defined(WEBP_USE_NEON)
#include <arm_neon.h>
// Right now, some intrinsics functions seem slower, so we disable them // Right now, some intrinsics functions seem slower, so we disable them
// everywhere except newer clang/gcc or aarch64 where the inline assembly is // everywhere except newer clang/gcc or aarch64 where the inline assembly is
// incompatible. // incompatible.
@ -98,4 +100,5 @@ static WEBP_INLINE int32x4x4_t Transpose4x4_NEON(const int32x4x4_t rows) {
} while (0) } while (0)
#endif #endif
#endif // WEBP_USE_NEON
#endif // WEBP_DSP_NEON_H_ #endif // WEBP_DSP_NEON_H_