/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef MOZILLA_GFX_SWIZZLE_GENERIC_DECLS_H_ #define MOZILLA_GFX_SWIZZLE_GENERIC_DECLS_H_ #include #include "Swizzle.h" namespace mozilla::gfx { extern const uint32_t sUnpremultiplyTable[256]; // The following template declarations are for templates our architecture // specific headers may choose to overload. template static MOZ_ALWAYS_INLINE xsimd::batch LoadRemainder_SIMD( const uint8_t* aSrc, size_t aLength); template static MOZ_ALWAYS_INLINE void StoreRemainder_SIMD( uint8_t* aDst, size_t aLength, const xsimd::batch& aSrc); template static MOZ_ALWAYS_INLINE xsimd::batch LoadRemainderRGB_SIMD( const uint8_t* aSrc, size_t aLength); template static MOZ_ALWAYS_INLINE xsimd::batch ExtractAlpha_SIMD( const xsimd::batch& aSrc, const xsimd::batch& aGreenAlpha); template static MOZ_ALWAYS_INLINE xsimd::batch SwapRB8_SIMD( const xsimd::batch& aPx); template static MOZ_ALWAYS_INLINE xsimd::batch SwapRB16_SIMD( const xsimd::batch& aRb); template static MOZ_ALWAYS_INLINE xsimd::batch UnpremultiplyLookup_SIMD( const xsimd::batch& aSrc, const xsimd::batch& aGa); template static MOZ_ALWAYS_INLINE xsimd::batch UnpremultiplyReverse_SIMD( const xsimd::batch& aSrc, const xsimd::batch& aRecip, const xsimd::batch& aRb, const xsimd::batch& aGa); template static MOZ_ALWAYS_INLINE xsimd::batch SwizzleVector_SIMD( const xsimd::batch& aSrc); template static MOZ_ALWAYS_INLINE xsimd::batch UnpackBatchRGB24_SIMD( const xsimd::batch& aSrc); } // namespace mozilla::gfx #endif /* MOZILLA_GFX_SWIZZLE_GENERIC_DECLS_H_ */