#include "libyuv/row.h"
#ifdef __cplusplus
namespace libyuv {
extern "C" {
#endif
#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#if defined(HAS_ARGBTOYROW_SSSE3) || defined(HAS_ARGBGRAYROW_SSSE3)
static const uvec8 kARGBToY = …;
static const uvec8 kARGBToYJ = …;
static const uvec8 kABGRToYJ = …;
static const uvec8 kRGBAToYJ = …;
#endif
#if defined(HAS_ARGBTOYROW_SSSE3) || defined(HAS_I422TOARGBROW_SSSE3)
static const vec8 kARGBToU = …;
static const vec8 kARGBToUJ = …;
static const vec8 kABGRToUJ = …;
static const vec8 kARGBToV = …;
static const vec8 kARGBToVJ = …;
static const vec8 kABGRToVJ = …;
static const uvec8 kBGRAToY = …;
static const vec8 kBGRAToU = …;
static const vec8 kBGRAToV = …;
static const uvec8 kABGRToY = …;
static const vec8 kABGRToU = …;
static const vec8 kABGRToV = …;
static const uvec8 kRGBAToY = …;
static const vec8 kRGBAToU = …;
static const vec8 kRGBAToV = …;
static const uvec16 kAddY16 = …;
static const uvec8 kAddUV128 = …;
static const uvec16 kSub128 = …;
#endif
#ifdef HAS_RGB24TOARGBROW_SSSE3
static const uvec8 kShuffleMaskRGB24ToARGB = …;
static const uvec8 kShuffleMaskRAWToARGB = …;
static const uvec8 kShuffleMaskRAWToRGBA = …;
static const uvec8 kShuffleMaskRAWToRGB24_0 = …;
static const uvec8 kShuffleMaskRAWToRGB24_1 = …;
static const uvec8 kShuffleMaskRAWToRGB24_2 = …;
static const uvec8 kShuffleMaskARGBToRGB24 = …;
static const uvec8 kShuffleMaskARGBToRAW = …;
static const uvec8 kShuffleMaskARGBToRGB24_0 = …;
static const vec8 kShuffleYUY2Y = …;
static const vec8 kShuffleYUY2UV = …;
static const vec8 kShuffleUYVYY = …;
static const vec8 kShuffleUYVYUV = …;
static const lvec8 kShuffleNV21 = …;
#endif
#ifdef HAS_J400TOARGBROW_SSE2
void J400ToARGBRow_SSE2(const uint8_t* src_y, uint8_t* dst_argb, int width) { … }
#endif
#ifdef HAS_RGB24TOARGBROW_SSSE3
void RGB24ToARGBRow_SSSE3(const uint8_t* src_rgb24,
uint8_t* dst_argb,
int width) { … }
void RAWToARGBRow_SSSE3(const uint8_t* src_raw, uint8_t* dst_argb, int width) { … }
void RAWToRGBARow_SSSE3(const uint8_t* src_raw, uint8_t* dst_rgba, int width) { … }
void RAWToRGB24Row_SSSE3(const uint8_t* src_raw,
uint8_t* dst_rgb24,
int width) { … }
void RGB565ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
void ARGB1555ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
void ARGB4444ToARGBRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
void ARGBToRGB24Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { … }
void ARGBToRAWRow_SSSE3(const uint8_t* src, uint8_t* dst, int width) { … }
#ifdef HAS_ARGBTORGB24ROW_AVX2
static const lvec32 kPermdRGB24_AVX = …;
void ARGBToRGB24Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ARGBTORGB24ROW_AVX512VBMI
static const ulvec8 kPermARGBToRGB24_0 = …;
static const ulvec8 kPermARGBToRGB24_1 = …;
static const ulvec8 kPermARGBToRGB24_2 = …;
void ARGBToRGB24Row_AVX512VBMI(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ARGBTORAWROW_AVX2
void ARGBToRAWRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
void ARGBToRGB565Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
void ARGBToRGB565DitherRow_SSE2(const uint8_t* src,
uint8_t* dst,
uint32_t dither4,
int width) { … }
#ifdef HAS_ARGBTORGB565DITHERROW_AVX2
void ARGBToRGB565DitherRow_AVX2(const uint8_t* src,
uint8_t* dst,
uint32_t dither4,
int width) { … }
#endif
void ARGBToARGB1555Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
void ARGBToARGB4444Row_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
static const uvec8 kShuffleRB30 = …;
static const uvec8 kShuffleBR30 = …;
static const uint32_t kMulRB10 = …;
static const uint32_t kMaskRB10 = …;
static const uint32_t kMaskAG10 = …;
static const uint32_t kMulAG10 = …;
void ARGBToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { … }
void ABGRToAR30Row_SSSE3(const uint8_t* src, uint8_t* dst, int width) { … }
#ifdef HAS_ARGBTOAR30ROW_AVX2
void ARGBToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ABGRTOAR30ROW_AVX2
void ABGRToAR30Row_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
static const uvec8 kShuffleARGBToABGR = …;
static const uvec8 kShuffleARGBToAB64Lo = …;
static const uvec8 kShuffleARGBToAB64Hi = …;
void ARGBToAR64Row_SSSE3(const uint8_t* src_argb,
uint16_t* dst_ar64,
int width) { … }
void ARGBToAB64Row_SSSE3(const uint8_t* src_argb,
uint16_t* dst_ab64,
int width) { … }
void AR64ToARGBRow_SSSE3(const uint16_t* src_ar64,
uint8_t* dst_argb,
int width) { … }
void AB64ToARGBRow_SSSE3(const uint16_t* src_ab64,
uint8_t* dst_argb,
int width) { … }
#ifdef HAS_ARGBTOAR64ROW_AVX2
void ARGBToAR64Row_AVX2(const uint8_t* src_argb,
uint16_t* dst_ar64,
int width) { … }
#endif
#ifdef HAS_ARGBTOAB64ROW_AVX2
void ARGBToAB64Row_AVX2(const uint8_t* src_argb,
uint16_t* dst_ab64,
int width) { … }
#endif
#ifdef HAS_AR64TOARGBROW_AVX2
void AR64ToARGBRow_AVX2(const uint16_t* src_ar64,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_AB64TOARGBROW_AVX2
void AB64ToARGBRow_AVX2(const uint16_t* src_ab64,
uint8_t* dst_argb,
int width) { … }
#endif
#define RGBTOY(round) …
#define RGBTOY_AVX2(round) …
#ifdef HAS_ARGBTOYROW_SSSE3
void ARGBToYRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_ARGBTOYJROW_SSSE3
void ARGBToYJRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_ABGRTOYJROW_SSSE3
void ABGRToYJRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_RGBATOYJROW_SSSE3
void RGBAToYJRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width) { … }
#endif
#if defined(HAS_ARGBTOYROW_AVX2) || defined(HAS_ABGRTOYROW_AVX2) || \
defined(HAS_ARGBEXTRACTALPHAROW_AVX2)
static const lvec32 kPermdARGBToY_AVX = …;
#endif
#ifdef HAS_ARGBTOYROW_AVX2
void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_ABGRTOYROW_AVX2
void ABGRToYRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_ARGBTOYJROW_AVX2
void ARGBToYJRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_ABGRTOYJROW_AVX2
void ABGRToYJRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_RGBATOYJROW_AVX2
void RGBAToYJRow_AVX2(const uint8_t* src_rgba, uint8_t* dst_y, int width) { … }
#endif
#ifdef HAS_ARGBTOUVROW_SSSE3
void ARGBToUVRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#if defined(HAS_ARGBTOUVROW_AVX2) || defined(HAS_ABGRTOUVROW_AVX2) || \
defined(HAS_ARGBTOUVJROW_AVX2) || defined(HAS_ABGRTOUVJROW_AVX2)
static const lvec8 kShufARGBToUV_AVX = …;
#endif
#if defined(HAS_ARGBTOUVROW_AVX2)
void ARGBToUVRow_AVX2(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_ABGRTOUVROW_AVX2
void ABGRToUVRow_AVX2(const uint8_t* src_abgr,
int src_stride_abgr,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_ARGBTOUVJROW_AVX2
void ARGBToUVJRow_AVX2(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_ABGRTOUVJROW_AVX2
void ABGRToUVJRow_AVX2(const uint8_t* src_abgr,
int src_stride_abgr,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_ARGBTOUVJROW_SSSE3
void ARGBToUVJRow_SSSE3(const uint8_t* src_argb,
int src_stride_argb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_ABGRTOUVJROW_SSSE3
void ABGRToUVJRow_SSSE3(const uint8_t* src_abgr,
int src_stride_abgr,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_ARGBTOUV444ROW_SSSE3
void ARGBToUV444Row_SSSE3(const uint8_t* src_argb,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
void BGRAToYRow_SSSE3(const uint8_t* src_bgra, uint8_t* dst_y, int width) { … }
void BGRAToUVRow_SSSE3(const uint8_t* src_bgra,
int src_stride_bgra,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void ABGRToYRow_SSSE3(const uint8_t* src_abgr, uint8_t* dst_y, int width) { … }
void RGBAToYRow_SSSE3(const uint8_t* src_rgba, uint8_t* dst_y, int width) { … }
void ABGRToUVRow_SSSE3(const uint8_t* src_abgr,
int src_stride_abgr,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void RGBAToUVRow_SSSE3(const uint8_t* src_rgba,
int src_stride_rgba,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#if defined(HAS_I422TOARGBROW_SSSE3) || defined(HAS_I422TOARGBROW_AVX2)
#define READYUV444 …
#define READYUV422 …
#define READYUV210 …
#define READYUVA210 …
#define READYUV410 …
#define READYUVA410 …
#define READYUV212 …
#define READYUVA422 …
#define READYUVA444 …
#define READNV12 …
#define READNV21 …
#define READYUY2 …
#define READUYVY …
#define READP210 …
#define READP410 …
#if defined(__x86_64__)
#define YUVTORGB_SETUP(yuvconstants) …
#define YUVTORGB16(yuvconstants) …
#define YUVTORGB_REGS …
#else
#define YUVTORGB_SETUP …
#define YUVTORGB16 …
#define YUVTORGB_REGS
#endif
#define YUVTORGB(yuvconstants) …
#define STOREARGB …
#define STORERGBA …
#define STORERGB24 …
#define STOREAR30 …
void OMITFP I444ToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#ifdef HAS_I444ALPHATOARGBROW_SSSE3
void OMITFP I444AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
const uint8_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
void OMITFP I422ToRGB24Row_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_rgb24,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I444ToRGB24Row_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_rgb24,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I422ToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I422ToAR30Row_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I210ToARGBRow_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I212ToARGBRow_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I210ToAR30Row_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I212ToAR30Row_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I410ToARGBRow_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#ifdef HAS_I210ALPHATOARGBROW_SSSE3
void OMITFP I210AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
const uint16_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#ifdef HAS_I410ALPHATOARGBROW_SSSE3
void OMITFP I410AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
const uint16_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
void OMITFP I410ToAR30Row_SSSE3(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
#ifdef HAS_I422ALPHATOARGBROW_SSSE3
void OMITFP I422AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
const uint8_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
void OMITFP NV12ToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP NV21ToARGBRow_SSSE3(const uint8_t* y_buf,
const uint8_t* vu_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP YUY2ToARGBRow_SSSE3(const uint8_t* yuy2_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP UYVYToARGBRow_SSSE3(const uint8_t* uyvy_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP P210ToARGBRow_SSSE3(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP P410ToARGBRow_SSSE3(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP P210ToAR30Row_SSSE3(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP P410ToAR30Row_SSSE3(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
void OMITFP I422ToRGBARow_SSSE3(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_rgba,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#define READYUV444_AVX2 …
#define READYUV422_AVX2 …
#define READYUV422_AVX512BW …
#define READYUV210_AVX2 …
#define READYUVA210_AVX2 …
#define READYUV410_AVX2 …
#define READYUV212_AVX2 …
#define READYUVA410_AVX2 …
#define READYUVA444_AVX2 …
#define READYUVA422_AVX2 …
#define READNV12_AVX2 …
#define READNV21_AVX2 …
#define READP210_AVX2 …
#define READP410_AVX2 …
#define READYUY2_AVX2 …
#define READUYVY_AVX2 …
#if defined(__x86_64__)
#define YUVTORGB_SETUP_AVX2(yuvconstants) …
#define YUVTORGB_SETUP_AVX512BW(yuvconstants) …
#define YUVTORGB16_AVX2(yuvconstants) …
#define YUVTORGB16_AVX512BW(yuvconstants) …
#define YUVTORGB_REGS_AVX2 …
#define YUVTORGB_REGS_AVX512BW …
#else
#define YUVTORGB_SETUP_AVX2 …
#define YUVTORGB16_AVX2 …
#define YUVTORGB_REGS_AVX2
#endif
#define YUVTORGB_AVX2(yuvconstants) …
#define YUVTORGB_AVX512BW(yuvconstants) …
#define STOREARGB_AVX2 …
#define STOREARGB_AVX512BW …
#define STOREAR30_AVX2 …
#ifdef HAS_I444TOARGBROW_AVX2
void OMITFP I444ToARGBRow_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I422TOARGBROW_AVX2)
void OMITFP I422ToARGBRow_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I422TOARGBROW_AVX512BW)
static const uint64_t kSplitQuadWords[8] = …;
static const uint64_t kSplitDoubleQuadWords[8] = …;
static const uint64_t kUnpermuteAVX512[8] = …;
void OMITFP I422ToARGBRow_AVX512BW(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I422TOAR30ROW_AVX2)
void OMITFP I422ToAR30Row_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I210TOARGBROW_AVX2)
void OMITFP I210ToARGBRow_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I212TOARGBROW_AVX2)
void OMITFP I212ToARGBRow_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I210TOAR30ROW_AVX2)
void OMITFP I210ToAR30Row_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I212TOAR30ROW_AVX2)
void OMITFP I212ToAR30Row_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I410TOARGBROW_AVX2)
void OMITFP I410ToARGBRow_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I210ALPHATOARGBROW_AVX2)
void OMITFP I210AlphaToARGBRow_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
const uint16_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I410ALPHATOARGBROW_AVX2)
void OMITFP I410AlphaToARGBRow_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
const uint16_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I410TOAR30ROW_AVX2)
void OMITFP I410ToAR30Row_AVX2(const uint16_t* y_buf,
const uint16_t* u_buf,
const uint16_t* v_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I444ALPHATOARGBROW_AVX2)
void OMITFP I444AlphaToARGBRow_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
const uint8_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I422ALPHATOARGBROW_AVX2)
void OMITFP I422AlphaToARGBRow_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
const uint8_t* a_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_I422TORGBAROW_AVX2)
void OMITFP I422ToRGBARow_AVX2(const uint8_t* y_buf,
const uint8_t* u_buf,
const uint8_t* v_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_NV12TOARGBROW_AVX2)
void OMITFP NV12ToARGBRow_AVX2(const uint8_t* y_buf,
const uint8_t* uv_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_NV21TOARGBROW_AVX2)
void OMITFP NV21ToARGBRow_AVX2(const uint8_t* y_buf,
const uint8_t* vu_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_YUY2TOARGBROW_AVX2)
void OMITFP YUY2ToARGBRow_AVX2(const uint8_t* yuy2_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_UYVYTOARGBROW_AVX2)
void OMITFP UYVYToARGBRow_AVX2(const uint8_t* uyvy_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_P210TOARGBROW_AVX2)
void OMITFP P210ToARGBRow_AVX2(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_P410TOARGBROW_AVX2)
void OMITFP P410ToARGBRow_AVX2(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_P210TOAR30ROW_AVX2)
void OMITFP P210ToAR30Row_AVX2(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#if defined(HAS_P410TOAR30ROW_AVX2)
void OMITFP P410ToAR30Row_AVX2(const uint16_t* y_buf,
const uint16_t* uv_buf,
uint8_t* dst_ar30,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#ifdef HAS_I400TOARGBROW_SSE2
void I400ToARGBRow_SSE2(const uint8_t* y_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#ifdef HAS_I400TOARGBROW_AVX2
void I400ToARGBRow_AVX2(const uint8_t* y_buf,
uint8_t* dst_argb,
const struct YuvConstants* yuvconstants,
int width) { … }
#endif
#ifdef HAS_MIRRORROW_SSSE3
static const uvec8 kShuffleMirror = …;
void MirrorRow_SSSE3(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_MIRRORROW_AVX2
void MirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_MIRRORUVROW_SSSE3
static const uvec8 kShuffleMirrorUV = …;
void MirrorUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_uv, int width) { … }
#endif
#ifdef HAS_MIRRORUVROW_AVX2
void MirrorUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_uv, int width) { … }
#endif
#ifdef HAS_MIRRORSPLITUVROW_SSSE3
static const uvec8 kShuffleMirrorSplitUV = …;
void MirrorSplitUVRow_SSSE3(const uint8_t* src,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_RGB24MIRRORROW_SSSE3
static const uvec8 kShuffleMirrorRGB0 = …;
static const uvec8 kShuffleMirrorRGB1 = …;
void RGB24MirrorRow_SSSE3(const uint8_t* src_rgb24,
uint8_t* dst_rgb24,
int width) { … }
#endif
#ifdef HAS_ARGBMIRRORROW_SSE2
void ARGBMirrorRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ARGBMIRRORROW_AVX2
static const ulvec32 kARGBShuffleMirror_AVX2 = …;
void ARGBMirrorRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_SPLITUVROW_AVX2
void SplitUVRow_AVX2(const uint8_t* src_uv,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_SPLITUVROW_SSE2
void SplitUVRow_SSE2(const uint8_t* src_uv,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_DETILEROW_SSE2
void DetileRow_SSE2(const uint8_t* src,
ptrdiff_t src_tile_stride,
uint8_t* dst,
int width) { … }
#endif
#ifdef HAS_DETILEROW_16_SSE2
void DetileRow_16_SSE2(const uint16_t* src,
ptrdiff_t src_tile_stride,
uint16_t* dst,
int width) { … }
#endif
#ifdef HAS_DETILEROW_16_AVX
void DetileRow_16_AVX(const uint16_t* src,
ptrdiff_t src_tile_stride,
uint16_t* dst,
int width) { … }
#endif
#ifdef HAS_DETILETOYUY2_SSE2
void DetileToYUY2_SSE2(const uint8_t* src_y,
ptrdiff_t src_y_tile_stride,
const uint8_t* src_uv,
ptrdiff_t src_uv_tile_stride,
uint8_t* dst_yuy2,
int width) { … }
#endif
#ifdef HAS_DETILESPLITUVROW_SSSE3
static const uvec8 kDeinterlaceUV = …;
void DetileSplitUVRow_SSSE3(const uint8_t* src_uv,
ptrdiff_t src_tile_stride,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_MERGEUVROW_AVX512BW
void MergeUVRow_AVX512BW(const uint8_t* src_u,
const uint8_t* src_v,
uint8_t* dst_uv,
int width) { … }
#endif
#ifdef HAS_MERGEUVROW_AVX2
void MergeUVRow_AVX2(const uint8_t* src_u,
const uint8_t* src_v,
uint8_t* dst_uv,
int width) { … }
#endif
#ifdef HAS_MERGEUVROW_SSE2
void MergeUVRow_SSE2(const uint8_t* src_u,
const uint8_t* src_v,
uint8_t* dst_uv,
int width) { … }
#endif
#ifdef HAS_MERGEUVROW_16_AVX2
void MergeUVRow_16_AVX2(const uint16_t* src_u,
const uint16_t* src_v,
uint16_t* dst_uv,
int depth,
int width) { … }
#endif
#ifdef HAS_SPLITUVROW_16_AVX2
const uvec8 kSplitUVShuffle16 = …;
void SplitUVRow_16_AVX2(const uint16_t* src_uv,
uint16_t* dst_u,
uint16_t* dst_v,
int depth,
int width) { … }
#endif
#ifdef HAS_MULTIPLYROW_16_AVX2
void MultiplyRow_16_AVX2(const uint16_t* src_y,
uint16_t* dst_y,
int scale,
int width) { … }
#endif
#ifdef HAS_DIVIDEROW_16_AVX2
void DivideRow_16_AVX2(const uint16_t* src_y,
uint16_t* dst_y,
int scale,
int width) { … }
#endif
void Convert16To8Row_SSSE3(const uint16_t* src_y,
uint8_t* dst_y,
int scale,
int width) { … }
#ifdef HAS_CONVERT16TO8ROW_AVX2
void Convert16To8Row_AVX2(const uint16_t* src_y,
uint8_t* dst_y,
int scale,
int width) { … }
#endif
#ifdef HAS_CONVERT16TO8ROW_AVX512BW
void Convert16To8Row_AVX512BW(const uint16_t* src_y,
uint8_t* dst_y,
int scale,
int width) { … }
#endif
void Convert8To16Row_SSE2(const uint8_t* src_y,
uint16_t* dst_y,
int scale,
int width) { … }
#ifdef HAS_CONVERT8TO16ROW_AVX2
void Convert8To16Row_AVX2(const uint8_t* src_y,
uint16_t* dst_y,
int scale,
int width) { … }
#endif
#ifdef HAS_SPLITRGBROW_SSSE3
static const uvec8 kSplitRGBShuffle[9] = …;
void SplitRGBRow_SSSE3(const uint8_t* src_rgb,
uint8_t* dst_r,
uint8_t* dst_g,
uint8_t* dst_b,
int width) { … }
#endif
#ifdef HAS_MERGERGBROW_SSSE3
static const uvec8 kMergeRGBShuffle[9] = …;
void MergeRGBRow_SSSE3(const uint8_t* src_r,
const uint8_t* src_g,
const uint8_t* src_b,
uint8_t* dst_rgb,
int width) { … }
#endif
#ifdef HAS_MERGEARGBROW_SSE2
void MergeARGBRow_SSE2(const uint8_t* src_r,
const uint8_t* src_g,
const uint8_t* src_b,
const uint8_t* src_a,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_MERGEXRGBROW_SSE2
void MergeXRGBRow_SSE2(const uint8_t* src_r,
const uint8_t* src_g,
const uint8_t* src_b,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_MERGEARGBROW_AVX2
void MergeARGBRow_AVX2(const uint8_t* src_r,
const uint8_t* src_g,
const uint8_t* src_b,
const uint8_t* src_a,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_MERGEXRGBROW_AVX2
void MergeXRGBRow_AVX2(const uint8_t* src_r,
const uint8_t* src_g,
const uint8_t* src_b,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_SPLITARGBROW_SSE2
void SplitARGBRow_SSE2(const uint8_t* src_argb,
uint8_t* dst_r,
uint8_t* dst_g,
uint8_t* dst_b,
uint8_t* dst_a,
int width) { … }
#endif
#ifdef HAS_SPLITXRGBROW_SSE2
void SplitXRGBRow_SSE2(const uint8_t* src_argb,
uint8_t* dst_r,
uint8_t* dst_g,
uint8_t* dst_b,
int width) { … }
#endif
static const uvec8 kShuffleMaskARGBSplit = …;
#ifdef HAS_SPLITARGBROW_SSSE3
void SplitARGBRow_SSSE3(const uint8_t* src_argb,
uint8_t* dst_r,
uint8_t* dst_g,
uint8_t* dst_b,
uint8_t* dst_a,
int width) { … }
#endif
#ifdef HAS_SPLITXRGBROW_SSSE3
void SplitXRGBRow_SSSE3(const uint8_t* src_argb,
uint8_t* dst_r,
uint8_t* dst_g,
uint8_t* dst_b,
int width) { … }
#endif
#ifdef HAS_SPLITARGBROW_AVX2
static const ulvec32 kShuffleMaskARGBPermute = …;
void SplitARGBRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_r,
uint8_t* dst_g,
uint8_t* dst_b,
uint8_t* dst_a,
int width) { … }
#endif
#ifdef HAS_SPLITXRGBROW_AVX2
void SplitXRGBRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_r,
uint8_t* dst_g,
uint8_t* dst_b,
int width) { … }
#endif
#ifdef HAS_MERGEXR30ROW_AVX2
void MergeXR30Row_AVX2(const uint16_t* src_r,
const uint16_t* src_g,
const uint16_t* src_b,
uint8_t* dst_ar30,
int depth,
int width) { … }
#endif
#ifdef HAS_MERGEAR64ROW_AVX2
static const lvec32 MergeAR64Permute = …;
void MergeAR64Row_AVX2(const uint16_t* src_r,
const uint16_t* src_g,
const uint16_t* src_b,
const uint16_t* src_a,
uint16_t* dst_ar64,
int depth,
int width) { … }
#endif
#ifdef HAS_MERGEXR64ROW_AVX2
void MergeXR64Row_AVX2(const uint16_t* src_r,
const uint16_t* src_g,
const uint16_t* src_b,
uint16_t* dst_ar64,
int depth,
int width) { … }
#endif
#ifdef HAS_MERGEARGB16TO8ROW_AVX2
static const uvec8 MergeARGB16To8Shuffle = …;
void MergeARGB16To8Row_AVX2(const uint16_t* src_r,
const uint16_t* src_g,
const uint16_t* src_b,
const uint16_t* src_a,
uint8_t* dst_argb,
int depth,
int width) { … }
#endif
#ifdef HAS_MERGEXRGB16TO8ROW_AVX2
void MergeXRGB16To8Row_AVX2(const uint16_t* src_r,
const uint16_t* src_g,
const uint16_t* src_b,
uint8_t* dst_argb,
int depth,
int width) { … }
#endif
#ifdef HAS_COPYROW_SSE2
void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_COPYROW_AVX
void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_COPYROW_ERMS
void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ARGBCOPYALPHAROW_SSE2
void ARGBCopyAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ARGBCOPYALPHAROW_AVX2
void ARGBCopyAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ARGBEXTRACTALPHAROW_SSE2
void ARGBExtractAlphaRow_SSE2(const uint8_t* src_argb,
uint8_t* dst_a,
int width) { … }
#endif
#ifdef HAS_ARGBEXTRACTALPHAROW_AVX2
static const uvec8 kShuffleAlphaShort_AVX2 = …;
void ARGBExtractAlphaRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_a,
int width) { … }
#endif
#ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2
void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_ARGBCOPYYTOALPHAROW_AVX2
void ARGBCopyYToAlphaRow_AVX2(const uint8_t* src, uint8_t* dst, int width) { … }
#endif
#ifdef HAS_SETROW_X86
void SetRow_X86(uint8_t* dst, uint8_t v8, int width) { … }
void SetRow_ERMS(uint8_t* dst, uint8_t v8, int width) { … }
void ARGBSetRow_X86(uint8_t* dst_argb, uint32_t v32, int width) { … }
#endif
#ifdef HAS_YUY2TOYROW_SSE2
void YUY2ToYRow_SSE2(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { … }
void YUY2ToNVUVRow_SSE2(const uint8_t* src_yuy2,
int stride_yuy2,
uint8_t* dst_uv,
int width) { … }
void YUY2ToUVRow_SSE2(const uint8_t* src_yuy2,
int stride_yuy2,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void YUY2ToUV422Row_SSE2(const uint8_t* src_yuy2,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void UYVYToYRow_SSE2(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { … }
void UYVYToUVRow_SSE2(const uint8_t* src_uyvy,
int stride_uyvy,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void UYVYToUV422Row_SSE2(const uint8_t* src_uyvy,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_YUY2TOYROW_AVX2
void YUY2ToYRow_AVX2(const uint8_t* src_yuy2, uint8_t* dst_y, int width) { … }
void YUY2ToNVUVRow_AVX2(const uint8_t* src_yuy2,
int stride_yuy2,
uint8_t* dst_uv,
int width) { … }
void YUY2ToUVRow_AVX2(const uint8_t* src_yuy2,
int stride_yuy2,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void YUY2ToUV422Row_AVX2(const uint8_t* src_yuy2,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void UYVYToYRow_AVX2(const uint8_t* src_uyvy, uint8_t* dst_y, int width) { … }
void UYVYToUVRow_AVX2(const uint8_t* src_uyvy,
int stride_uyvy,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
void UYVYToUV422Row_AVX2(const uint8_t* src_uyvy,
uint8_t* dst_u,
uint8_t* dst_v,
int width) { … }
#endif
#ifdef HAS_ARGBBLENDROW_SSSE3
static const uvec8 kShuffleAlpha = …;
void ARGBBlendRow_SSSE3(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_BLENDPLANEROW_SSSE3
void BlendPlaneRow_SSSE3(const uint8_t* src0,
const uint8_t* src1,
const uint8_t* alpha,
uint8_t* dst,
int width) { … }
#endif
#ifdef HAS_BLENDPLANEROW_AVX2
void BlendPlaneRow_AVX2(const uint8_t* src0,
const uint8_t* src1,
const uint8_t* alpha,
uint8_t* dst,
int width) { … }
#endif
#ifdef HAS_ARGBATTENUATEROW_SSSE3
static const vec8 kAttenuateShuffle = …;
void ARGBAttenuateRow_SSSE3(const uint8_t* src_argb,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBATTENUATEROW_AVX2
static const lvec8 kAttenuateShuffle_AVX2 = …;
void ARGBAttenuateRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBUNATTENUATEROW_SSE2
void ARGBUnattenuateRow_SSE2(const uint8_t* src_argb,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBUNATTENUATEROW_AVX2
static const uvec8 kUnattenShuffleAlpha_AVX2 = …;
void ARGBUnattenuateRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBGRAYROW_SSSE3
void ARGBGrayRow_SSSE3(const uint8_t* src_argb, uint8_t* dst_argb, int width) { … }
#endif
#ifdef HAS_ARGBSEPIAROW_SSSE3
static const vec8 kARGBToSepiaB = …;
static const vec8 kARGBToSepiaG = …;
static const vec8 kARGBToSepiaR = …;
void ARGBSepiaRow_SSSE3(uint8_t* dst_argb, int width) { … }
#endif
#ifdef HAS_ARGBCOLORMATRIXROW_SSSE3
void ARGBColorMatrixRow_SSSE3(const uint8_t* src_argb,
uint8_t* dst_argb,
const int8_t* matrix_argb,
int width) { … }
#endif
#ifdef HAS_ARGBQUANTIZEROW_SSE2
void ARGBQuantizeRow_SSE2(uint8_t* dst_argb,
int scale,
int interval_size,
int interval_offset,
int width) { … }
#endif
#ifdef HAS_ARGBSHADEROW_SSE2
void ARGBShadeRow_SSE2(const uint8_t* src_argb,
uint8_t* dst_argb,
int width,
uint32_t value) { … }
#endif
#ifdef HAS_ARGBMULTIPLYROW_SSE2
void ARGBMultiplyRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBMULTIPLYROW_AVX2
void ARGBMultiplyRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBADDROW_SSE2
void ARGBAddRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBADDROW_AVX2
void ARGBAddRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBSUBTRACTROW_SSE2
void ARGBSubtractRow_SSE2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_ARGBSUBTRACTROW_AVX2
void ARGBSubtractRow_AVX2(const uint8_t* src_argb,
const uint8_t* src_argb1,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_SOBELXROW_SSE2
void SobelXRow_SSE2(const uint8_t* src_y0,
const uint8_t* src_y1,
const uint8_t* src_y2,
uint8_t* dst_sobelx,
int width) { … }
#endif
#ifdef HAS_SOBELYROW_SSE2
void SobelYRow_SSE2(const uint8_t* src_y0,
const uint8_t* src_y1,
uint8_t* dst_sobely,
int width) { … }
#endif
#ifdef HAS_SOBELROW_SSE2
void SobelRow_SSE2(const uint8_t* src_sobelx,
const uint8_t* src_sobely,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_SOBELTOPLANEROW_SSE2
void SobelToPlaneRow_SSE2(const uint8_t* src_sobelx,
const uint8_t* src_sobely,
uint8_t* dst_y,
int width) { … }
#endif
#ifdef HAS_SOBELXYROW_SSE2
void SobelXYRow_SSE2(const uint8_t* src_sobelx,
const uint8_t* src_sobely,
uint8_t* dst_argb,
int width) { … }
#endif
#ifdef HAS_COMPUTECUMULATIVESUMROW_SSE2
void ComputeCumulativeSumRow_SSE2(const uint8_t* row,
int32_t* cumsum,
const int32_t* previous_cumsum,
int width) { … }
#endif
#ifdef HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
void CumulativeSumToAverageRow_SSE2(const int32_t* topleft,
const int32_t* botleft,
int width,
int area,
uint8_t* dst,
int count) { … }
#endif
#ifdef HAS_ARGBAFFINEROW_SSE2
LIBYUV_API
void ARGBAffineRow_SSE2(const uint8_t* src_argb,
int src_argb_stride,
uint8_t* dst_argb,
const float* src_dudv,
int width) { … }
#endif
#ifdef HAS_INTERPOLATEROW_SSSE3
void InterpolateRow_SSSE3(uint8_t* dst_ptr,
const uint8_t* src_ptr,
ptrdiff_t src_stride,
int width,
int source_y_fraction) { … }
#endif
#ifdef HAS_INTERPOLATEROW_AVX2
void InterpolateRow_AVX2(uint8_t* dst_ptr,
const uint8_t* src_ptr,
ptrdiff_t src_stride,
int width,
int source_y_fraction) { … }
#endif
#ifdef HAS_ARGBSHUFFLEROW_SSSE3
void ARGBShuffleRow_SSSE3(const uint8_t* src_argb,
uint8_t* dst_argb,
const uint8_t* shuffler,
int width) { … }
#endif
#ifdef HAS_ARGBSHUFFLEROW_AVX2
void ARGBShuffleRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_argb,
const uint8_t* shuffler,
int width) { … }
#endif
#ifdef HAS_I422TOYUY2ROW_SSE2
void I422ToYUY2Row_SSE2(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
uint8_t* dst_yuy2,
int width) { … }
#endif
#ifdef HAS_I422TOUYVYROW_SSE2
void I422ToUYVYRow_SSE2(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
uint8_t* dst_uyvy,
int width) { … }
#endif
#ifdef HAS_I422TOYUY2ROW_AVX2
void I422ToYUY2Row_AVX2(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
uint8_t* dst_yuy2,
int width) { … }
#endif
#ifdef HAS_I422TOUYVYROW_AVX2
void I422ToUYVYRow_AVX2(const uint8_t* src_y,
const uint8_t* src_u,
const uint8_t* src_v,
uint8_t* dst_uyvy,
int width) { … }
#endif
#ifdef HAS_ARGBPOLYNOMIALROW_SSE2
void ARGBPolynomialRow_SSE2(const uint8_t* src_argb,
uint8_t* dst_argb,
const float* poly,
int width) { … }
#endif
#ifdef HAS_ARGBPOLYNOMIALROW_AVX2
void ARGBPolynomialRow_AVX2(const uint8_t* src_argb,
uint8_t* dst_argb,
const float* poly,
int width) { … }
#endif
#ifdef HAS_HALFFLOATROW_SSE2
static float kScaleBias = …;
void HalfFloatRow_SSE2(const uint16_t* src,
uint16_t* dst,
float scale,
int width) { … }
#endif
#ifdef HAS_HALFFLOATROW_AVX2
void HalfFloatRow_AVX2(const uint16_t* src,
uint16_t* dst,
float scale,
int width) { … }
#endif
#ifdef HAS_HALFFLOATROW_F16C
void HalfFloatRow_F16C(const uint16_t* src,
uint16_t* dst,
float scale,
int width) {
asm volatile (
"vbroadcastss %3, %%ymm4 \n"
"sub %0,%1 \n"
LABELALIGN
"1: \n"
"vpmovzxwd (%0),%%ymm2 \n"
"vpmovzxwd 0x10(%0),%%ymm3 \n"
"vcvtdq2ps %%ymm2,%%ymm2 \n"
"vcvtdq2ps %%ymm3,%%ymm3 \n"
"vmulps %%ymm2,%%ymm4,%%ymm2 \n"
"vmulps %%ymm3,%%ymm4,%%ymm3 \n"
"vcvtps2ph $3, %%ymm2, %%xmm2 \n"
"vcvtps2ph $3, %%ymm3, %%xmm3 \n"
"vmovdqu %%xmm2,0x00(%0,%1,1) \n"
"vmovdqu %%xmm3,0x10(%0,%1,1) \n"
"add $0x20,%0 \n"
"sub $0x10,%2 \n"
"jg 1b \n"
"vzeroupper \n"
: "+r"(src),
"+r"(dst),
"+r"(width)
#if defined(__x86_64__)
: "x"(scale)
#else
: "m"(scale)
#endif
: "memory", "cc", "xmm2", "xmm3", "xmm4");
}
#endif
#ifdef HAS_HALFFLOATROW_F16C
void HalfFloat1Row_F16C(const uint16_t* src, uint16_t* dst, float, int width) {
asm volatile (
"sub %0,%1 \n"
LABELALIGN
"1: \n"
"vpmovzxwd (%0),%%ymm2 \n"
"vpmovzxwd 0x10(%0),%%ymm3 \n"
"vcvtdq2ps %%ymm2,%%ymm2 \n"
"vcvtdq2ps %%ymm3,%%ymm3 \n"
"vcvtps2ph $3, %%ymm2, %%xmm2 \n"
"vcvtps2ph $3, %%ymm3, %%xmm3 \n"
"vmovdqu %%xmm2,0x00(%0,%1,1) \n"
"vmovdqu %%xmm3,0x10(%0,%1,1) \n"
"add $0x20,%0 \n"
"sub $0x10,%2 \n"
"jg 1b \n"
"vzeroupper \n"
: "+r"(src),
"+r"(dst),
"+r"(width)
:
: "memory", "cc", "xmm2", "xmm3");
}
#endif
#ifdef HAS_ARGBCOLORTABLEROW_X86
void ARGBColorTableRow_X86(uint8_t* dst_argb,
const uint8_t* table_argb,
int width) { … }
#endif
#ifdef HAS_RGBCOLORTABLEROW_X86
void RGBColorTableRow_X86(uint8_t* dst_argb,
const uint8_t* table_argb,
int width) { … }
#endif
#ifdef HAS_ARGBLUMACOLORTABLEROW_SSSE3
void ARGBLumaColorTableRow_SSSE3(const uint8_t* src_argb,
uint8_t* dst_argb,
int width,
const uint8_t* luma,
uint32_t lumacoeff) { … }
#endif
static const uvec8 kYUV24Shuffle[3] = …;
void NV21ToYUV24Row_SSSE3(const uint8_t* src_y,
const uint8_t* src_vu,
uint8_t* dst_yuv24,
int width) { … }
void NV21ToYUV24Row_AVX2(const uint8_t* src_y,
const uint8_t* src_vu,
uint8_t* dst_yuv24,
int width) { … }
#ifdef HAS_NV21ToYUV24ROW_AVX512
static const lvec8 kYUV24Perm[3] = {
{32, 33, 0, 32, 33, 1, 34, 35, 2, 34, 35, 3, 36, 37, 4, 36,
37, 5, 38, 39, 6, 38, 39, 7, 40, 41, 8, 40, 41, 9, 42, 43},
{10, 42, 43, 11, 44, 45, 12, 44, 45, 13, 46, 47, 14, 46, 47, 15,
48, 49, 16, 48, 49, 17, 50, 51, 18, 50, 51, 19, 52, 53, 20, 52},
{53, 21, 54, 55, 22, 54, 55, 23, 56, 57, 24, 56, 57, 25, 58, 59,
26, 58, 59, 27, 60, 61, 28, 60, 61, 29, 62, 63, 30, 62, 63, 31}};
void NV21ToYUV24Row_AVX512(const uint8_t* src_y,
const uint8_t* src_vu,
uint8_t* dst_yuv24,
int width) {
asm volatile (
"sub %0,%1 \n"
"vmovdqa (%4),%%ymm4 \n"
"vmovdqa 32(%4),%%ymm5 \n"
"vmovdqa 64(%4),%%ymm6 \n" LABELALIGN
"1: \n"
"vmovdqu (%0),%%ymm2 \n"
"vmovdqu (%0,%1),%%ymm3 \n"
"lea 32(%0),%0 \n"
"vmovdqa %%ymm2, %%ymm0 \n"
"vmovdqa %%ymm2, %%ymm1 \n"
"vpermt2b %%ymm3,%%ymm4,%%ymm0 \n"
"vpermt2b %%ymm3,%%ymm5,%%ymm1 \n"
"vpermt2b %%ymm3,%%ymm6,%%ymm2 \n"
"vmovdqu %%ymm0,(%2) \n"
"vmovdqu %%ymm1,32(%2) \n"
"vmovdqu %%ymm2,64(%2) \n"
"lea 96(%2),%2 \n"
"sub $32,%3 \n"
"jg 1b \n"
"vzeroupper \n"
: "+r"(src_y),
"+r"(src_vu),
"+r"(dst_yuv24),
"+r"(width)
: "r"(&kYUV24Perm[0])
: "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
}
#endif
#ifdef HAS_SWAPUVROW_SSSE3
static const uvec8 kShuffleUVToVU = …;
void SwapUVRow_SSSE3(const uint8_t* src_uv, uint8_t* dst_vu, int width) { … }
#endif
#ifdef HAS_SWAPUVROW_AVX2
void SwapUVRow_AVX2(const uint8_t* src_uv, uint8_t* dst_vu, int width) { … }
#endif
void HalfMergeUVRow_SSSE3(const uint8_t* src_u,
int src_stride_u,
const uint8_t* src_v,
int src_stride_v,
uint8_t* dst_uv,
int width) { … }
void HalfMergeUVRow_AVX2(const uint8_t* src_u,
int src_stride_u,
const uint8_t* src_v,
int src_stride_v,
uint8_t* dst_uv,
int width) { … }
void ClampFloatToZero_SSE2(const float* src_x, float* dst_y, int width) { … }
#endif
#ifdef __cplusplus
}
}
#endif