33#include <libkern/OSByteOrder.h>
34#define VMX_BUFFERSWAP(t) OSSwapInt64(t)
35#define __lzcnt64(t) __builtin_clzll(t)
36#define __lzcnt(t) __builtin_clz(t)
37#define _tzcnt_u64(t) __builtin_ctzll(t)
40#define VMX_BUFFERSWAP(t) _byteswap_uint64(t)
41static uint64_t __lzcnt64(uint64_t t)
44 if (_BitScanReverse64(&index, t))
52static inline uint32_t __lzcnt(uint32_t t)
55 if (_BitScanReverse(&index, t))
63static inline uint64_t _tzcnt_u64(uint64_t t)
66 if (_BitScanForward64(&index, t)) {
74#define VMX_BUFFERSWAP(t) __builtin_bswap64(t)
75#define __lzcnt64(t) __builtin_clzll(t)
76#define __lzcnt(t) __builtin_clz(t)
77#define _tzcnt_u64(t) __builtin_ctzll(t)
82void VMX_BROADCAST_DC_8X8_128(
short src,
BYTE* dst,
int stride,
short addVal);
83void VMX_BROADCAST_DC_8X8_128_16(
short src,
BYTE* dst,
int stride,
short addVal);
84void VMX_ZIG_INVQUANTIZE_IDCT_8X8_128(
short* src,
unsigned short* matrix,
BYTE* dst,
int stride,
short addVal);
85void VMX_ZIG_INVQUANTIZE_IDCT_8X8_128_16(
short* src,
unsigned short* matrix,
BYTE* dst,
int stride,
short addVal);
86void VMX_FDCT_8X8_QUANT_ZIG_128(
const BYTE* src,
int stride,
unsigned short* matrix,
short addVal,
__m128i* out0,
__m128i* out1,
__m128i* out2,
__m128i* out3,
__m128i* out4,
__m128i* out5,
__m128i* out6,
__m128i* out7);
87void VMX_FDCT_8X8_QUANT_ZIG_128_16(
const BYTE* src,
int stride,
unsigned short* matrix,
short addVal,
__m128i* out0,
__m128i* out1,
__m128i* out2,
__m128i* out3,
__m128i* out4,
__m128i* out5,
__m128i* out6,
__m128i* out7);
88void VMX_PlanarToUYVY(
BYTE* ysrc,
int ystride,
BYTE* usrc,
int ustride,
BYTE* vsrc,
int vstride,
BYTE* dst,
int stride,
VMX_SIZE size);
89void VMX_PlanarToP216(
BYTE* ysrc,
int ystride,
BYTE* usrc,
int ustride,
BYTE* vsrc,
int vstride,
BYTE* dstY,
int dstStrideY,
BYTE* dstUV,
int dstStrideUV,
VMX_SIZE size);
90void VMX_UYVYToPlanar(
BYTE* src,
int stride,
BYTE* ydst,
int ystride,
BYTE* udst,
int ustride,
BYTE* vdst,
int vstride,
VMX_SIZE size);
91void VMX_P216ToPlanar(
BYTE* srcY,
int srcStrideY,
BYTE* srcUV,
int srcStrideUV,
BYTE* ydst,
int ystride,
BYTE* udst,
int ustride,
BYTE* vdst,
int vstride,
VMX_SIZE size);
92void VMX_AToPlanar(
BYTE* src,
int srcStride,
BYTE* adst,
int astride,
VMX_SIZE size);
93void VMX_A16ToPlanar(
BYTE* src,
int srcStride,
BYTE* adst,
int astride,
VMX_SIZE size);
94void VMX_PlanarToA(
BYTE* asrc,
int astride,
BYTE* dst,
int dstStride,
VMX_SIZE size);
95void VMX_PlanarToA16(
BYTE* asrc,
int astride,
BYTE* dst,
int dstStride,
VMX_SIZE size);
96void VMX_PlanarToYUY2(
BYTE* ysrc,
int ystride,
BYTE* usrc,
int ustride,
BYTE* vsrc,
int vstride,
BYTE* dst,
int stride,
VMX_SIZE size);
97void VMX_YUY2ToPlanar(
BYTE* src,
int stride,
BYTE* ydst,
int ystride,
BYTE* udst,
int ustride,
BYTE* vdst,
int vstride,
VMX_SIZE size);
98void VMX_NV12ToPlanar(
BYTE* srcY,
int strideY,
BYTE* srcUV,
int strideUV,
BYTE* ydst,
int ystride,
BYTE* udst,
int ustride,
BYTE* vdst,
int vstride,
VMX_SIZE size);
99void VMX_YV12ToPlanar(
BYTE* srcY,
int srcStrideY,
BYTE* srcU,
int srcStrideU,
BYTE* srcV,
int srcStrideV,
BYTE* ydst,
int ystride,
BYTE* udst,
int ustride,
BYTE* vdst,
int vstride,
VMX_SIZE size);
102void VMX_YUV4224ToBGRA(
BYTE* pSrcY,
int iStrideY,
BYTE* pSrcU,
int iStrideU,
BYTE* pSrcV,
int iStrideV,
BYTE* pSrcA,
int iStrideA,
BYTE* pDst,
int dstStride,
VMX_SIZE sz,
const short* colorTable);
103void VMX_BGRAToYUV4224(
BYTE* pSrc,
int srcStride,
BYTE* pDstY,
int iStrideY,
BYTE* pDstU,
int iStrideU,
BYTE* pDstV,
int iStrideV,
BYTE* pDstA,
int iStrideA,
VMX_SIZE sz,
const ShortRGB* colorTables);
107void VMX_BGRXToUYVYInternal(
BYTE* pSrc,
int srcStride,
BYTE* pDst,
int iStride,
VMX_SIZE sz,
const ShortRGB* colorTables);
108int VMX_BGRXToUYVYConditionalInternal(
BYTE* pSrc,
BYTE* pSrcPrev,
int srcStride,
BYTE* pDst,
int iStride,
VMX_SIZE sz,
const ShortRGB* colorTables);
109float VMX_CalculatePSNR_128(
BYTE* p1,
BYTE* p2,
int stride,
int bytesPerPixel,
VMX_SIZE sz);
int64x2_t __m128i
Definition sse2neon.h:415
Definition vmxcodec_common.h:143
Definition vmxcodec.h:147
Definition vmxcodec.h:138
Definition vmxcodec.h:124
unsigned char BYTE
Definition vmxcodec.h:48