Download 3rdparty/libwebp/src/dsp/cpu.h from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 8.84 kB
-
https://huggingface.co/tgollogly/test/resolve/main/3rdparty/libwebp/src/dsp/cpu.h
- Command line
-
hf download hf://tgollogly/test/3rdparty/libwebp/src/dsp/cpu.h
-
curl -L -o cpu.h https://huggingface.co/tgollogly/test/resolve/main/3rdparty/libwebp/src/dsp/cpu.h
8.84 kB
| // Copyright 2022 Google Inc. All Rights Reserved. | |
| // | |
| // Use of this source code is governed by a BSD-style license | |
| // that can be found in the COPYING file in the root of the source | |
| // tree. An additional intellectual property rights grant can be found | |
| // in the file PATENTS. All contributing project authors may | |
| // be found in the AUTHORS file in the root of the source tree. | |
| // ----------------------------------------------------------------------------- | |
| // | |
| // CPU detection functions and macros. | |
| // | |
| // Author: Skal (pascal.massimino@gmail.com) | |
| //------------------------------------------------------------------------------ | |
| // x86 defines. | |
| // WEBP_HAVE_* are used to indicate the presence of the instruction set in dsp | |
| // files without intrinsics, allowing the corresponding Init() to be called. | |
| // Files containing intrinsics will need to be built targeting the instruction | |
| // set so should succeed on one of the earlier tests. | |
| //------------------------------------------------------------------------------ | |
| // Arm defines. | |
| // The intrinsics currently cause compiler errors with arm-nacl-gcc and the | |
| // inline assembly would need to be modified for use with Native Client. | |
| // Note: ARM64 is supported in Visual Studio 2017, but requires the direct | |
| // inclusion of arm64_neon.h; Visual Studio 2019 includes this file in | |
| // arm_neon.h. Compile errors were seen with Visual Studio 2019 16.4 with | |
| // vtbl4_u8(); a fix was made in 16.6. | |
| //------------------------------------------------------------------------------ | |
| // MIPS defines. | |
| //------------------------------------------------------------------------------ | |
| //------------------------------------------------------------------------------ | |
| // This macro prevents thread_sanitizer from reporting known concurrent writes. | |
| // Defines an Init + helper function that control multiple initialization of | |
| // function pointers / tables. | |
| /* Usage: | |
| WEBP_DSP_INIT_FUNC(InitFunc) { | |
| ...function body | |
| } | |
| */ | |
| // This macro prevents the undefined behavior sanitizer from reporting | |
| // failures. This is only meant to silence unaligned loads on platforms that | |
| // are known to support them. | |
| // This macro prevents the undefined behavior sanitizer from reporting | |
| // failures related to unsigned integer overflows. This is only meant to | |
| // silence cases where this well defined behavior is expected. | |
| // If 'ptr' is NULL, returns NULL. Otherwise returns 'ptr + off'. | |
| // Prevents undefined behavior sanitizer nullptr-with-nonzero-offset warning. | |
| // Regularize the definition of WEBP_SWAP_16BIT_CSP (backward compatibility) | |
| // some endian fix (e.g.: mips-gcc doesn't define __BIG_ENDIAN__) | |
| typedef enum { | |
| kSSE2, | |
| kSSE3, | |
| kSlowSSSE3, // special feature for slow SSSE3 architectures | |
| kSSE4_1, | |
| kAVX, | |
| kAVX2, | |
| kNEON, | |
| kMIPS32, | |
| kMIPSdspR2, | |
| kMSA | |
| } CPUFeature; | |
| // returns true if the CPU supports the feature. | |
| typedef int (*VP8CPUInfo)(CPUFeature feature); | |