mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-08 01:36:47 +08:00
Add optimization functions in row_lsx.cc file.
Optimize 44 functions in source/row_lsx.cc file. All test cases passed on loongarch platform. Bug: libyuv:913 Change-Id: Ic80a5751314adc2e9bd435f2bbd928ab017a90f9 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3351467 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
de8ae8c679
commit
dfe046d272
@ -684,6 +684,54 @@ extern "C" {
|
||||
#define HAS_YUY2TOYROW_MMI
|
||||
#endif
|
||||
|
||||
#if !defined(LIBYUV_DISABLE_LSX) && defined(__loongarch_sx)
|
||||
#define HAS_ARGB4444TOARGBROW_LSX
|
||||
#define HAS_ARGB1555TOARGBROW_LSX
|
||||
#define HAS_RGB565TOARGBROW_LSX
|
||||
#define HAS_RGB24TOARGBROW_LSX
|
||||
#define HAS_RAWTOARGBROW_LSX
|
||||
#define HAS_ARGB1555TOYROW_LSX
|
||||
#define HAS_ARGB1555TOUVROW_LSX
|
||||
#define HAS_RGB565TOYROW_LSX
|
||||
#define HAS_RGB565TOUVROW_LSX
|
||||
#define HAS_RGB24TOYROW_LSX
|
||||
#define HAS_RGB24TOUVROW_LSX
|
||||
#define HAS_RAWTOYROW_LSX
|
||||
#define HAS_RAWTOUVROW_LSX
|
||||
#define HAS_NV12TOARGBROW_LSX
|
||||
#define HAS_NV12TORGB565ROW_LSX
|
||||
#define HAS_NV21TOARGBROW_LSX
|
||||
#define HAS_SOBELROW_LSX
|
||||
#define HAS_SOBELTOPLANEROW_LSX
|
||||
#define HAS_SOBELXYROW_LSX
|
||||
#define HAS_ARGBTOYJROW_LSX
|
||||
#define HAS_BGRATOYROW_LSX
|
||||
#define HAS_BGRATOUVROW_LSX
|
||||
#define HAS_ABGRTOYROW_LSX
|
||||
#define HAS_ABGRTOUVROW_LSX
|
||||
#define HAS_RGBATOYROW_LSX
|
||||
#define HAS_RGBATOUVROW_LSX
|
||||
#define HAS_ARGBTOUVJROW_LSX
|
||||
#define HAS_I444TOARGBROW_LSX
|
||||
#define HAS_I400TOARGBROW_LSX
|
||||
#define HAS_J400TOARGBROW_LSX
|
||||
#define HAS_YUY2TOARGBROW_LSX
|
||||
#define HAS_UYVYTOARGBROW_LSX
|
||||
#define HAS_INTERPOLATEROW_LSX
|
||||
#define HAS_ARGBSETROW_LSX
|
||||
#define HAS_RAWTORGB24ROW_LSX
|
||||
#define HAS_MERGEUVROW_LSX
|
||||
#define HAS_ARGBEXTRACTALPHAROW_LSX
|
||||
#define HAS_ARGBBLENDROW_LSX
|
||||
#define HAS_ARGBQUANTIZEROW_LSX
|
||||
#define HAS_ARGBCOLORMATRIXROW_LSX
|
||||
#define HAS_SPLITUVROW_LSX
|
||||
#define HAS_SETROW_LSX
|
||||
#define HAS_MIRRORSPLITUVROW_LSX
|
||||
#define HAS_SOBELXROW_LSX
|
||||
#define HAS_SOBELYROW_LSX
|
||||
#define HAS_HALFFLOATROW_LSX
|
||||
#endif
|
||||
|
||||
#if !defined(LIBYUV_DISABLE_LASX) && defined(__loongarch_asx)
|
||||
#define HAS_I422TOARGBROW_LASX
|
||||
@ -986,6 +1034,12 @@ void I444ToARGBRow_MMI(const uint8_t* src_y,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I444ToARGBRow_LSX(const uint8_t* src_y,
|
||||
const uint8_t* src_u,
|
||||
const uint8_t* src_v,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
|
||||
void I422ToARGBRow_MSA(const uint8_t* src_y,
|
||||
const uint8_t* src_u,
|
||||
@ -1103,6 +1157,30 @@ void UYVYToARGBRow_MSA(const uint8_t* src_uyvy,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
|
||||
void NV12ToARGBRow_LSX(const uint8_t* src_y,
|
||||
const uint8_t* src_uv,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void NV12ToRGB565Row_LSX(const uint8_t* src_y,
|
||||
const uint8_t* src_uv,
|
||||
uint8_t* dst_rgb565,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void NV21ToARGBRow_LSX(const uint8_t* src_y,
|
||||
const uint8_t* src_vu,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void YUY2ToARGBRow_LSX(const uint8_t* src_yuy2,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void UYVYToARGBRow_LSX(const uint8_t* src_uyvy,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
|
||||
void ARGBToYRow_AVX2(const uint8_t* src_argb, uint8_t* dst_y, int width);
|
||||
void ARGBToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void ABGRToYRow_AVX2(const uint8_t* src_abgr, uint8_t* dst_y, int width);
|
||||
@ -1131,6 +1209,7 @@ void ARGBToYJRow_MSA(const uint8_t* src_argb0, uint8_t* dst_y, int width);
|
||||
void ARGBToYRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
|
||||
void ARGBToYJRow_MMI(const uint8_t* src_argb0, uint8_t* dst_y, int width);
|
||||
void ARGBToYRow_LASX(const uint8_t* src_argb0, uint8_t* dst_y, int width);
|
||||
void ARGBToYJRow_LSX(const uint8_t* src_argb0, uint8_t* dst_y, int width);
|
||||
void ARGBToUV444Row_NEON(const uint8_t* src_argb,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
@ -1267,6 +1346,46 @@ void ARGBToUVJRow_MMI(const uint8_t* src_rgb,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void BGRAToUVRow_LSX(const uint8_t* src_bgra,
|
||||
int src_stride_bgra,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ABGRToUVRow_LSX(const uint8_t* src_abgr,
|
||||
int src_stride_abgr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGBAToUVRow_LSX(const uint8_t* src_rgba,
|
||||
int src_stride_rgba,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ARGBToUVJRow_LSX(const uint8_t* src_argb,
|
||||
int src_stride_argb,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ARGB1555ToUVRow_LSX(const uint8_t* src_argb1555,
|
||||
int src_stride_argb1555,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGB565ToUVRow_LSX(const uint8_t* src_rgb565,
|
||||
int src_stride_rgb565,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGB24ToUVRow_LSX(const uint8_t* src_rgb24,
|
||||
int src_stride_rgb24,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RAWToUVRow_LSX(const uint8_t* src_raw,
|
||||
int src_stride_raw,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void BGRAToUVRow_MMI(const uint8_t* src_rgb,
|
||||
int src_stride_rgb,
|
||||
uint8_t* dst_u,
|
||||
@ -1337,6 +1456,14 @@ void RGB565ToYRow_MMI(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
|
||||
void ARGB1555ToYRow_MMI(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
|
||||
void ARGB4444ToYRow_MMI(const uint8_t* src_argb4444, uint8_t* dst_y, int width);
|
||||
|
||||
void BGRAToYRow_LSX(const uint8_t* src_bgra, uint8_t* dst_y, int width);
|
||||
void ABGRToYRow_LSX(const uint8_t* src_abgr, uint8_t* dst_y, int width);
|
||||
void RGBAToYRow_LSX(const uint8_t* src_rgba, uint8_t* dst_y, int width);
|
||||
void ARGB1555ToYRow_LSX(const uint8_t* src_argb1555, uint8_t* dst_y, int width);
|
||||
void RGB565ToYRow_LSX(const uint8_t* src_rgb565, uint8_t* dst_y, int width);
|
||||
void RGB24ToYRow_LSX(const uint8_t* src_rgb24, uint8_t* dst_y, int width);
|
||||
void RAWToYRow_LSX(const uint8_t* src_raw, uint8_t* dst_y, int width);
|
||||
|
||||
void ARGBToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
|
||||
void ARGBToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
|
||||
void RGBAToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
|
||||
@ -1407,7 +1534,17 @@ void ARGB4444ToYRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
|
||||
void BGRAToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void ABGRToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RGBAToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void ARGBToYJRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RGB24ToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RGB565ToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void ARGB1555ToYRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void ARGBToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToYRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
|
||||
void ARGBToUVRow_AVX2(const uint8_t* src_argb,
|
||||
int src_stride_argb,
|
||||
@ -1625,6 +1762,46 @@ void ARGBToUVJRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ABGRToUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void BGRAToUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGBAToUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ARGBToUVJRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ARGB1555ToUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGB565ToUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGB24ToUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RAWToUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void BGRAToUVRow_Any_MMI(const uint8_t* src_ptr,
|
||||
int src_stride_ptr,
|
||||
uint8_t* dst_u,
|
||||
@ -1792,6 +1969,10 @@ void MirrorSplitUVRow_MMI(const uint8_t* src_uv,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void MirrorSplitUVRow_LSX(const uint8_t* src_uv,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void MirrorSplitUVRow_C(const uint8_t* src_uv,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
@ -1855,6 +2036,10 @@ void SplitUVRow_MMI(const uint8_t* src_uv,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void SplitUVRow_LSX(const uint8_t* src_uv,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void SplitUVRow_Any_SSE2(const uint8_t* src_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
@ -1875,6 +2060,10 @@ void SplitUVRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void SplitUVRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
|
||||
void MergeUVRow_C(const uint8_t* src_u,
|
||||
const uint8_t* src_v,
|
||||
@ -1900,6 +2089,10 @@ void MergeUVRow_MMI(const uint8_t* src_u,
|
||||
const uint8_t* src_v,
|
||||
uint8_t* dst_uv,
|
||||
int width);
|
||||
void MergeUVRow_LSX(const uint8_t* src_u,
|
||||
const uint8_t* src_v,
|
||||
uint8_t* dst_uv,
|
||||
int width);
|
||||
void MergeUVRow_Any_SSE2(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
@ -1920,6 +2113,10 @@ void MergeUVRow_Any_MMI(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void MergeUVRow_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
|
||||
void HalfMergeUVRow_C(const uint8_t* src_u,
|
||||
int src_stride_u,
|
||||
@ -2548,6 +2745,9 @@ void ARGBExtractAlphaRow_MSA(const uint8_t* src_argb,
|
||||
void ARGBExtractAlphaRow_MMI(const uint8_t* src_argb,
|
||||
uint8_t* dst_a,
|
||||
int width);
|
||||
void ARGBExtractAlphaRow_LSX(const uint8_t* src_argb,
|
||||
uint8_t* dst_a,
|
||||
int width);
|
||||
void ARGBExtractAlphaRow_Any_SSE2(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
@ -2563,6 +2763,9 @@ void ARGBExtractAlphaRow_Any_MSA(const uint8_t* src_ptr,
|
||||
void ARGBExtractAlphaRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void ARGBExtractAlphaRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
|
||||
void ARGBCopyYToAlphaRow_C(const uint8_t* src, uint8_t* dst, int width);
|
||||
void ARGBCopyYToAlphaRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
|
||||
@ -2583,8 +2786,10 @@ void SetRow_MSA(uint8_t* dst, uint8_t v8, int width);
|
||||
void SetRow_X86(uint8_t* dst, uint8_t v8, int width);
|
||||
void SetRow_ERMS(uint8_t* dst, uint8_t v8, int width);
|
||||
void SetRow_NEON(uint8_t* dst, uint8_t v8, int width);
|
||||
void SetRow_LSX(uint8_t* dst, uint8_t v8, int width);
|
||||
void SetRow_Any_X86(uint8_t* dst_ptr, uint8_t v32, int width);
|
||||
void SetRow_Any_NEON(uint8_t* dst_ptr, uint8_t v32, int width);
|
||||
void SetRow_Any_LSX(uint8_t* dst_ptr, uint8_t v32, int width);
|
||||
|
||||
void ARGBSetRow_C(uint8_t* dst_argb, uint32_t v32, int width);
|
||||
void ARGBSetRow_X86(uint8_t* dst_argb, uint32_t v32, int width);
|
||||
@ -2594,6 +2799,8 @@ void ARGBSetRow_MSA(uint8_t* dst_argb, uint32_t v32, int width);
|
||||
void ARGBSetRow_Any_MSA(uint8_t* dst_ptr, uint32_t v32, int width);
|
||||
void ARGBSetRow_MMI(uint8_t* dst_argb, uint32_t v32, int width);
|
||||
void ARGBSetRow_Any_MMI(uint8_t* dst_ptr, uint32_t v32, int width);
|
||||
void ARGBSetRow_LSX(uint8_t* dst_argb, uint32_t v32, int width);
|
||||
void ARGBSetRow_Any_LSX(uint8_t* dst_ptr, uint32_t v32, int width);
|
||||
|
||||
// ARGBShufflers for BGRAToARGB etc.
|
||||
void ARGBShuffleRow_C(const uint8_t* src_argb,
|
||||
@ -2673,13 +2880,16 @@ void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24,
|
||||
int width);
|
||||
void RGB24ToARGBRow_MSA(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
|
||||
void RGB24ToARGBRow_MMI(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
|
||||
void RGB24ToARGBRow_LSX(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
|
||||
void RAWToARGBRow_NEON(const uint8_t* src_raw, uint8_t* dst_argb, int width);
|
||||
void RAWToRGBARow_NEON(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
|
||||
void RAWToARGBRow_MSA(const uint8_t* src_raw, uint8_t* dst_argb, int width);
|
||||
void RAWToARGBRow_MMI(const uint8_t* src_raw, uint8_t* dst_argb, int width);
|
||||
void RAWToARGBRow_LSX(const uint8_t* src_raw, uint8_t* dst_argb, int width);
|
||||
void RAWToRGB24Row_NEON(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
|
||||
void RAWToRGB24Row_MSA(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
|
||||
void RAWToRGB24Row_MMI(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
|
||||
void RAWToRGB24Row_LSX(const uint8_t* src_raw, uint8_t* dst_rgb24, int width);
|
||||
void RGB565ToARGBRow_NEON(const uint8_t* src_rgb565,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
@ -2689,6 +2899,9 @@ void RGB565ToARGBRow_MSA(const uint8_t* src_rgb565,
|
||||
void RGB565ToARGBRow_MMI(const uint8_t* src_rgb565,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void RGB565ToARGBRow_LSX(const uint8_t* src_rgb565,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void ARGB1555ToARGBRow_NEON(const uint8_t* src_argb1555,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
@ -2698,6 +2911,9 @@ void ARGB1555ToARGBRow_MSA(const uint8_t* src_argb1555,
|
||||
void ARGB1555ToARGBRow_MMI(const uint8_t* src_argb1555,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void ARGB1555ToARGBRow_LSX(const uint8_t* src_argb1555,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void ARGB4444ToARGBRow_NEON(const uint8_t* src_argb4444,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
@ -2707,6 +2923,9 @@ void ARGB4444ToARGBRow_MSA(const uint8_t* src_argb4444,
|
||||
void ARGB4444ToARGBRow_MMI(const uint8_t* src_argb4444,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void ARGB4444ToARGBRow_LSX(const uint8_t* src_argb4444,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void RGB24ToARGBRow_C(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
|
||||
void RAWToARGBRow_C(const uint8_t* src_raw, uint8_t* dst_argb, int width);
|
||||
void RAWToRGBARow_C(const uint8_t* src_raw, uint8_t* dst_rgba, int width);
|
||||
@ -2764,15 +2983,20 @@ void RGB24ToARGBRow_Any_MSA(const uint8_t* src_ptr,
|
||||
void RGB24ToARGBRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void RGB24ToARGBRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void RAWToARGBRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToRGBARow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToARGBRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToRGB24Row_Any_NEON(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void RAWToRGB24Row_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToRGB24Row_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RAWToRGB24Row_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void RGB565ToARGBRow_Any_NEON(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
@ -2782,6 +3006,9 @@ void RGB565ToARGBRow_Any_MSA(const uint8_t* src_ptr,
|
||||
void RGB565ToARGBRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void RGB565ToARGBRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void ARGB1555ToARGBRow_Any_NEON(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
@ -2794,6 +3021,9 @@ void ARGB1555ToARGBRow_Any_MMI(const uint8_t* src_ptr,
|
||||
void ARGB4444ToARGBRow_Any_NEON(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void ARGB1555ToARGBRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
|
||||
void ARGB4444ToARGBRow_Any_MSA(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
@ -2801,6 +3031,9 @@ void ARGB4444ToARGBRow_Any_MSA(const uint8_t* src_ptr,
|
||||
void ARGB4444ToARGBRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void ARGB4444ToARGBRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
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);
|
||||
@ -2976,6 +3209,7 @@ void J400ToARGBRow_AVX2(const uint8_t* src_y, uint8_t* dst_argb, int width);
|
||||
void J400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width);
|
||||
void J400ToARGBRow_MSA(const uint8_t* src_y, uint8_t* dst_argb, int width);
|
||||
void J400ToARGBRow_MMI(const uint8_t* src_y, uint8_t* dst_argb, int width);
|
||||
void J400ToARGBRow_LSX(const uint8_t* src_y, uint8_t* dst_argb, int width);
|
||||
void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width);
|
||||
void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
@ -2988,6 +3222,7 @@ void J400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
|
||||
int width);
|
||||
void J400ToARGBRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void J400ToARGBRow_Any_MMI(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
void J400ToARGBRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
|
||||
|
||||
void I444ToARGBRow_C(const uint8_t* src_y,
|
||||
const uint8_t* src_u,
|
||||
@ -3875,6 +4110,10 @@ void I400ToARGBRow_MMI(const uint8_t* src_y,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I400ToARGBRow_LSX(const uint8_t* src_y,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* param,
|
||||
@ -3895,6 +4134,10 @@ void I400ToARGBRow_Any_MMI(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I400ToARGBRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
|
||||
// ARGB preattenuated alpha blend.
|
||||
void ARGBBlendRow_SSSE3(const uint8_t* src_argb,
|
||||
@ -3913,6 +4156,10 @@ void ARGBBlendRow_MMI(const uint8_t* src_argb0,
|
||||
const uint8_t* src_argb1,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void ARGBBlendRow_LSX(const uint8_t* src_argb0,
|
||||
const uint8_t* src_argb1,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void ARGBBlendRow_C(const uint8_t* src_argb,
|
||||
const uint8_t* src_argb1,
|
||||
uint8_t* dst_argb,
|
||||
@ -4388,6 +4635,12 @@ void I444ToARGBRow_Any_MMI(const uint8_t* y_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I444ToARGBRow_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* u_buf,
|
||||
const uint8_t* v_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I422ToARGBRow_Any_MSA(const uint8_t* y_buf,
|
||||
const uint8_t* u_buf,
|
||||
const uint8_t* v_buf,
|
||||
@ -4504,6 +4757,30 @@ void UYVYToARGBRow_Any_MSA(const uint8_t* src_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
|
||||
void NV12ToARGBRow_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void NV12ToRGB565Row_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void NV21ToARGBRow_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void YUY2ToARGBRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void UYVYToARGBRow_Any_LSX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
|
||||
void YUY2ToYRow_AVX2(const uint8_t* src_yuy2, uint8_t* dst_y, int width);
|
||||
void YUY2ToUVRow_AVX2(const uint8_t* src_yuy2,
|
||||
int stride_yuy2,
|
||||
@ -5032,6 +5309,10 @@ void ARGBColorMatrixRow_MMI(const uint8_t* src_argb,
|
||||
uint8_t* dst_argb,
|
||||
const int8_t* matrix_argb,
|
||||
int width);
|
||||
void ARGBColorMatrixRow_LSX(const uint8_t* src_argb,
|
||||
uint8_t* dst_argb,
|
||||
const int8_t* matrix_argb,
|
||||
int width);
|
||||
|
||||
void ARGBColorTableRow_C(uint8_t* dst_argb,
|
||||
const uint8_t* table_argb,
|
||||
@ -5067,6 +5348,12 @@ void ARGBQuantizeRow_MSA(uint8_t* dst_argb,
|
||||
int interval_size,
|
||||
int interval_offset,
|
||||
int width);
|
||||
void ARGBQuantizeRow_LSX(uint8_t* dst_argb,
|
||||
int scale,
|
||||
int interval_size,
|
||||
int interval_offset,
|
||||
int width);
|
||||
|
||||
|
||||
void ARGBShadeRow_C(const uint8_t* src_argb,
|
||||
uint8_t* dst_argb,
|
||||
@ -5165,6 +5452,11 @@ void InterpolateRow_MMI(uint8_t* dst_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
int width,
|
||||
int source_y_fraction);
|
||||
void InterpolateRow_LSX(uint8_t* dst_ptr,
|
||||
const uint8_t* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
int width,
|
||||
int source_y_fraction);
|
||||
void InterpolateRow_Any_NEON(uint8_t* dst_ptr,
|
||||
const uint8_t* src_ptr,
|
||||
ptrdiff_t src_stride_ptr,
|
||||
@ -5190,6 +5482,11 @@ void InterpolateRow_Any_MMI(uint8_t* dst_ptr,
|
||||
ptrdiff_t src_stride_ptr,
|
||||
int width,
|
||||
int source_y_fraction);
|
||||
void InterpolateRow_Any_LSX(uint8_t* dst_ptr,
|
||||
const uint8_t* src_ptr,
|
||||
ptrdiff_t src_stride_ptr,
|
||||
int width,
|
||||
int source_y_fraction);
|
||||
|
||||
void InterpolateRow_16_C(uint16_t* dst_ptr,
|
||||
const uint16_t* src_ptr,
|
||||
@ -5263,6 +5560,10 @@ void SobelRow_MMI(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void SobelRow_LSX(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void SobelToPlaneRow_C(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_y,
|
||||
@ -5283,6 +5584,10 @@ void SobelToPlaneRow_MMI(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_y,
|
||||
int width);
|
||||
void SobelToPlaneRow_LSX(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_y,
|
||||
int width);
|
||||
void SobelXYRow_C(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_argb,
|
||||
@ -5303,6 +5608,10 @@ void SobelXYRow_MMI(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void SobelXYRow_LSX(const uint8_t* src_sobelx,
|
||||
const uint8_t* src_sobely,
|
||||
uint8_t* dst_argb,
|
||||
int width);
|
||||
void SobelRow_Any_SSE2(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
@ -5319,6 +5628,10 @@ void SobelRow_Any_MMI(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void SobelRow_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void SobelToPlaneRow_Any_SSE2(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
@ -5335,6 +5648,10 @@ void SobelToPlaneRow_Any_MMI(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void SobelToPlaneRow_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void SobelXYRow_Any_SSE2(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
@ -5351,6 +5668,10 @@ void SobelXYRow_Any_MMI(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
void SobelXYRow_Any_LSX(const uint8_t* y_buf,
|
||||
const uint8_t* uv_buf,
|
||||
uint8_t* dst_ptr,
|
||||
int width);
|
||||
|
||||
void ARGBPolynomialRow_C(const uint8_t* src_argb,
|
||||
uint8_t* dst_argb,
|
||||
@ -5423,6 +5744,14 @@ void HalfFloatRow_Any_MSA(const uint16_t* src_ptr,
|
||||
uint16_t* dst_ptr,
|
||||
float param,
|
||||
int width);
|
||||
void HalfFloatRow_LSX(const uint16_t* src,
|
||||
uint16_t* dst,
|
||||
float scale,
|
||||
int width);
|
||||
void HalfFloatRow_Any_LSX(const uint16_t* src_ptr,
|
||||
uint16_t* dst_ptr,
|
||||
float param,
|
||||
int width);
|
||||
void ByteToFloatRow_C(const uint8_t* src, float* dst, float scale, int width);
|
||||
void ByteToFloatRow_NEON(const uint8_t* src,
|
||||
float* dst,
|
||||
|
||||
@ -644,6 +644,14 @@ int I422ToNV21(const uint8_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_MERGEUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
MergeUVRow = MergeUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(halfwidth, 16)) {
|
||||
MergeUVRow = MergeUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3)) {
|
||||
InterpolateRow = InterpolateRow_Any_SSSE3;
|
||||
@ -684,6 +692,14 @@ int I422ToNV21(const uint8_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dst_y) {
|
||||
CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, halfwidth, height);
|
||||
@ -1562,6 +1578,16 @@ int BGRAToI420(const uint8_t* src_bgra,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_BGRATOYROW_LSX) && defined(HAS_BGRATOUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
BGRAToYRow = BGRAToYRow_Any_LSX;
|
||||
BGRAToUVRow = BGRAToUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
BGRAToYRow = BGRAToYRow_LSX;
|
||||
BGRAToUVRow = BGRAToUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height - 1; y += 2) {
|
||||
BGRAToUVRow(src_bgra, src_stride_bgra, dst_u, dst_v, width);
|
||||
@ -1676,6 +1702,16 @@ int ABGRToI420(const uint8_t* src_abgr,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ABGRTOYROW_LSX) && defined(HAS_ABGRTOUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ABGRToYRow = ABGRToYRow_Any_LSX;
|
||||
ABGRToUVRow = ABGRToUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ABGRToYRow = ABGRToYRow_LSX;
|
||||
ABGRToUVRow = ABGRToUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height - 1; y += 2) {
|
||||
ABGRToUVRow(src_abgr, src_stride_abgr, dst_u, dst_v, width);
|
||||
@ -1774,6 +1810,16 @@ int RGBAToI420(const uint8_t* src_rgba,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RGBATOYROW_LSX) && defined(HAS_RGBATOUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RGBAToYRow = RGBAToYRow_Any_LSX;
|
||||
RGBAToUVRow = RGBAToUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RGBAToYRow = RGBAToYRow_LSX;
|
||||
RGBAToUVRow = RGBAToUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height - 1; y += 2) {
|
||||
RGBAToUVRow(src_rgba, src_stride_rgba, dst_u, dst_v, width);
|
||||
@ -1793,7 +1839,7 @@ int RGBAToI420(const uint8_t* src_rgba,
|
||||
|
||||
// Enabled if 1 pass is available
|
||||
#if (defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA) || \
|
||||
defined(HAS_RGB24TOYROW_MMI))
|
||||
defined(HAS_RGB24TOYROW_MMI) || defined(HAS_RGB24TOYROW_LSX))
|
||||
#define HAS_RGB24TOYROW
|
||||
#endif
|
||||
|
||||
@ -1872,6 +1918,16 @@ int RGB24ToI420(const uint8_t* src_rgb24,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RGB24TOYROW_LSX) && defined(HAS_RGB24TOUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RGB24ToUVRow = RGB24ToUVRow_Any_LSX;
|
||||
RGB24ToYRow = RGB24ToYRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RGB24ToYRow = RGB24ToYRow_LSX;
|
||||
RGB24ToUVRow = RGB24ToUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Other platforms do intermediate conversion from RGB24 to ARGB.
|
||||
#else // HAS_RGB24TOYROW
|
||||
@ -2131,7 +2187,7 @@ int RGB24ToJ420(const uint8_t* src_rgb24,
|
||||
|
||||
// Enabled if 1 pass is available
|
||||
#if (defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA) || \
|
||||
defined(HAS_RAWTOYROW_MMI))
|
||||
defined(HAS_RAWTOYROW_MMI) || defined(HAS_RAWTOYROW_LSX))
|
||||
#define HAS_RAWTOYROW
|
||||
#endif
|
||||
|
||||
@ -2209,6 +2265,16 @@ int RAWToI420(const uint8_t* src_raw,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RAWTOYROW_LSX) && defined(HAS_RAWTOUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RAWToUVRow = RAWToUVRow_Any_LSX;
|
||||
RAWToYRow = RAWToYRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RAWToYRow = RAWToYRow_LSX;
|
||||
RAWToUVRow = RAWToUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Other platforms do intermediate conversion from RAW to ARGB.
|
||||
#else // HAS_RAWTOYROW
|
||||
@ -2480,7 +2546,7 @@ int RGB565ToI420(const uint8_t* src_rgb565,
|
||||
int height) {
|
||||
int y;
|
||||
#if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \
|
||||
defined(HAS_RGB565TOYROW_MMI))
|
||||
defined(HAS_RGB565TOYROW_MMI) || defined(HAS_RGB565TOYROW_LSX))
|
||||
void (*RGB565ToUVRow)(const uint8_t* src_rgb565, int src_stride_rgb565,
|
||||
uint8_t* dst_u, uint8_t* dst_v, int width) =
|
||||
RGB565ToUVRow_C;
|
||||
@ -2518,7 +2584,8 @@ int RGB565ToI420(const uint8_t* src_rgb565,
|
||||
}
|
||||
}
|
||||
// MMI and MSA version does direct RGB565 to YUV.
|
||||
#elif (defined(HAS_RGB565TOYROW_MMI) || defined(HAS_RGB565TOYROW_MSA))
|
||||
#elif (defined(HAS_RGB565TOYROW_MMI) || defined(HAS_RGB565TOYROW_MSA) \
|
||||
|| defined(HAS_RGB565TOYROW_LSX))
|
||||
#if defined(HAS_RGB565TOYROW_MMI) && defined(HAS_RGB565TOUVROW_MMI)
|
||||
if (TestCpuFlag(kCpuHasMMI)) {
|
||||
RGB565ToUVRow = RGB565ToUVRow_Any_MMI;
|
||||
@ -2541,6 +2608,16 @@ int RGB565ToI420(const uint8_t* src_rgb565,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RGB565TOYROW_LSX) && defined(HAS_RGB565TOUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RGB565ToUVRow = RGB565ToUVRow_Any_LSX;
|
||||
RGB565ToYRow = RGB565ToYRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RGB565ToYRow = RGB565ToYRow_LSX;
|
||||
RGB565ToUVRow = RGB565ToUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Other platforms do intermediate conversion from RGB565 to ARGB.
|
||||
#else
|
||||
#if defined(HAS_RGB565TOARGBROW_SSE2)
|
||||
@ -2594,14 +2671,14 @@ int RGB565ToI420(const uint8_t* src_rgb565,
|
||||
#endif
|
||||
{
|
||||
#if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \
|
||||
defined(HAS_RGB565TOYROW_MMI))
|
||||
defined(HAS_RGB565TOYROW_MMI) || defined(HAS_RGB565TOYROW_LSX))
|
||||
// Allocate 2 rows of ARGB.
|
||||
const int kRowSize = (width * 4 + 31) & ~31;
|
||||
align_buffer_64(row, kRowSize * 2);
|
||||
#endif
|
||||
for (y = 0; y < height - 1; y += 2) {
|
||||
#if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \
|
||||
defined(HAS_RGB565TOYROW_MMI))
|
||||
defined(HAS_RGB565TOYROW_MMI) || defined(HAS_RGB565TOYROW_LSX))
|
||||
RGB565ToUVRow(src_rgb565, src_stride_rgb565, dst_u, dst_v, width);
|
||||
RGB565ToYRow(src_rgb565, dst_y, width);
|
||||
RGB565ToYRow(src_rgb565 + src_stride_rgb565, dst_y + dst_stride_y, width);
|
||||
@ -2619,7 +2696,7 @@ int RGB565ToI420(const uint8_t* src_rgb565,
|
||||
}
|
||||
if (height & 1) {
|
||||
#if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \
|
||||
defined(HAS_RGB565TOYROW_MMI))
|
||||
defined(HAS_RGB565TOYROW_MMI) || defined(HAS_RGB565TOYROW_LSX))
|
||||
RGB565ToUVRow(src_rgb565, 0, dst_u, dst_v, width);
|
||||
RGB565ToYRow(src_rgb565, dst_y, width);
|
||||
#else
|
||||
@ -2629,7 +2706,7 @@ int RGB565ToI420(const uint8_t* src_rgb565,
|
||||
#endif
|
||||
}
|
||||
#if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA) || \
|
||||
defined(HAS_RGB565TOYROW_MMI))
|
||||
defined(HAS_RGB565TOYROW_MMI) || defined(HAS_RGB565TOYROW_LSX))
|
||||
free_aligned_buffer_64(row);
|
||||
#endif
|
||||
}
|
||||
@ -2650,7 +2727,7 @@ int ARGB1555ToI420(const uint8_t* src_argb1555,
|
||||
int height) {
|
||||
int y;
|
||||
#if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \
|
||||
defined(HAS_ARGB1555TOYROW_MMI))
|
||||
defined(HAS_ARGB1555TOYROW_MMI) || defined(HAS_ARGB1555TOYROW_LSX))
|
||||
void (*ARGB1555ToUVRow)(const uint8_t* src_argb1555, int src_stride_argb1555,
|
||||
uint8_t* dst_u, uint8_t* dst_v, int width) =
|
||||
ARGB1555ToUVRow_C;
|
||||
@ -2712,6 +2789,15 @@ int ARGB1555ToI420(const uint8_t* src_argb1555,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#elif (defined(HAS_ARGB1555TOYROW_LSX) && defined(HAS_ARGB1555TOUVROW_LSX))
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGB1555ToUVRow = ARGB1555ToUVRow_Any_LSX;
|
||||
ARGB1555ToYRow = ARGB1555ToYRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ARGB1555ToYRow = ARGB1555ToYRow_LSX;
|
||||
ARGB1555ToUVRow = ARGB1555ToUVRow_LSX;
|
||||
}
|
||||
}
|
||||
// Other platforms do intermediate conversion from ARGB1555 to ARGB.
|
||||
#else
|
||||
#if defined(HAS_ARGB1555TOARGBROW_SSE2)
|
||||
@ -2765,7 +2851,7 @@ int ARGB1555ToI420(const uint8_t* src_argb1555,
|
||||
#endif
|
||||
{
|
||||
#if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \
|
||||
defined(HAS_ARGB1555TOYROW_MMI))
|
||||
defined(HAS_ARGB1555TOYROW_MMI) || defined(HAS_ARGB1555TOYROW_LSX))
|
||||
// Allocate 2 rows of ARGB.
|
||||
const int kRowSize = (width * 4 + 31) & ~31;
|
||||
align_buffer_64(row, kRowSize * 2);
|
||||
@ -2773,7 +2859,7 @@ int ARGB1555ToI420(const uint8_t* src_argb1555,
|
||||
|
||||
for (y = 0; y < height - 1; y += 2) {
|
||||
#if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \
|
||||
defined(HAS_ARGB1555TOYROW_MMI))
|
||||
defined(HAS_ARGB1555TOYROW_MMI) || defined(HAS_ARGB1555TOYROW_LSX))
|
||||
ARGB1555ToUVRow(src_argb1555, src_stride_argb1555, dst_u, dst_v, width);
|
||||
ARGB1555ToYRow(src_argb1555, dst_y, width);
|
||||
ARGB1555ToYRow(src_argb1555 + src_stride_argb1555, dst_y + dst_stride_y,
|
||||
@ -2793,7 +2879,7 @@ int ARGB1555ToI420(const uint8_t* src_argb1555,
|
||||
}
|
||||
if (height & 1) {
|
||||
#if (defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \
|
||||
defined(HAS_ARGB1555TOYROW_MMI))
|
||||
defined(HAS_ARGB1555TOYROW_MMI) || defined(HAS_ARGB1555TOYROW_LSX))
|
||||
ARGB1555ToUVRow(src_argb1555, 0, dst_u, dst_v, width);
|
||||
ARGB1555ToYRow(src_argb1555, dst_y, width);
|
||||
#else
|
||||
@ -2803,7 +2889,7 @@ int ARGB1555ToI420(const uint8_t* src_argb1555,
|
||||
#endif
|
||||
}
|
||||
#if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA) || \
|
||||
defined(HAS_ARGB1555TOYROW_MMI))
|
||||
defined(HAS_ARGB1555TOYROW_MMI) || defined(HAS_ARGB1555TOYROW_LSX))
|
||||
free_aligned_buffer_64(row);
|
||||
#endif
|
||||
}
|
||||
@ -2898,6 +2984,14 @@ int ARGB4444ToI420(const uint8_t* src_argb4444,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGB4444TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGB4444ToARGBRow = ARGB4444ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ARGB4444ToARGBRow = ARGB4444ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBTOYROW_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3)) {
|
||||
ARGBToYRow = ARGBToYRow_Any_SSSE3;
|
||||
|
||||
@ -605,6 +605,14 @@ int I444ToARGBMatrix(const uint8_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_I444TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
I444ToARGBRow = I444ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
I444ToARGBRow = I444ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
I444ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
|
||||
@ -2731,6 +2739,14 @@ int I400ToARGBMatrix(const uint8_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_I400TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
I400ToARGBRow = I400ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
I400ToARGBRow = I400ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
I400ToARGBRow(src_y, dst_argb, yuvconstants, width);
|
||||
@ -2817,6 +2833,14 @@ int J400ToARGB(const uint8_t* src_y,
|
||||
J400ToARGBRow = J400ToARGBRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_J400TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
J400ToARGBRow = J400ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
J400ToARGBRow = J400ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (y = 0; y < height; ++y) {
|
||||
J400ToARGBRow(src_y, dst_argb, width);
|
||||
@ -2972,6 +2996,14 @@ int RGB24ToARGB(const uint8_t* src_rgb24,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RGB24TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RGB24ToARGBRow = RGB24ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RGB24ToARGBRow = RGB24ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
RGB24ToARGBRow(src_rgb24, dst_argb, width);
|
||||
@ -3039,6 +3071,14 @@ int RAWToARGB(const uint8_t* src_raw,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RAWTOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RAWToARGBRow = RAWToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RAWToARGBRow = RAWToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
RAWToARGBRow(src_raw, dst_argb, width);
|
||||
@ -3165,6 +3205,14 @@ int RGB565ToARGB(const uint8_t* src_rgb565,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RGB565TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RGB565ToARGBRow = RGB565ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RGB565ToARGBRow = RGB565ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
RGB565ToARGBRow(src_rgb565, dst_argb, width);
|
||||
@ -3240,6 +3288,14 @@ int ARGB1555ToARGB(const uint8_t* src_argb1555,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGB1555TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGB1555ToARGBRow = ARGB1555ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ARGB1555ToARGBRow = ARGB1555ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
ARGB1555ToARGBRow(src_argb1555, dst_argb, width);
|
||||
@ -3315,6 +3371,14 @@ int ARGB4444ToARGB(const uint8_t* src_argb4444,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGB4444TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGB4444ToARGBRow = ARGB4444ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ARGB4444ToARGBRow = ARGB4444ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
ARGB4444ToARGBRow(src_argb4444, dst_argb, width);
|
||||
@ -3602,6 +3666,14 @@ int NV12ToARGBMatrix(const uint8_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_NV12TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
NV12ToARGBRow = NV12ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 8)) {
|
||||
NV12ToARGBRow = NV12ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
NV12ToARGBRow(src_y, src_uv, dst_argb, yuvconstants, width);
|
||||
@ -3678,6 +3750,14 @@ int NV21ToARGBMatrix(const uint8_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_NV21TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
NV21ToARGBRow = NV21ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 8)) {
|
||||
NV21ToARGBRow = NV21ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
NV21ToARGBRow(src_y, src_vu, dst_argb, yuvconstants, width);
|
||||
@ -4065,6 +4145,14 @@ int YUY2ToARGB(const uint8_t* src_yuy2,
|
||||
YUY2ToARGBRow = YUY2ToARGBRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_YUY2TOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
YUY2ToARGBRow = YUY2ToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 8)) {
|
||||
YUY2ToARGBRow = YUY2ToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (y = 0; y < height; ++y) {
|
||||
YUY2ToARGBRow(src_yuy2, dst_argb, &kYuvI601Constants, width);
|
||||
@ -4140,6 +4228,14 @@ int UYVYToARGB(const uint8_t* src_uyvy,
|
||||
UYVYToARGBRow = UYVYToARGBRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_UYVYTOARGBROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
UYVYToARGBRow = UYVYToARGBRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 8)) {
|
||||
UYVYToARGBRow = UYVYToARGBRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (y = 0; y < height; ++y) {
|
||||
UYVYToARGBRow(src_uyvy, dst_argb, &kYuvI601Constants, width);
|
||||
@ -4450,6 +4546,14 @@ int NV12ToRGB565Matrix(const uint8_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_NV12TORGB565ROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
NV12ToRGB565Row = NV12ToRGB565Row_Any_LSX;
|
||||
if (IS_ALIGNED(width, 8)) {
|
||||
NV12ToRGB565Row = NV12ToRGB565Row_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
NV12ToRGB565Row(src_y, src_uv, dst_rgb565, yuvconstants, width);
|
||||
|
||||
@ -431,6 +431,14 @@ int ARGBToNV12(const uint8_t* src_argb,
|
||||
MergeUVRow_ = MergeUVRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_MERGEUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
MergeUVRow_ = MergeUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(halfwidth, 16)) {
|
||||
MergeUVRow_ = MergeUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
// Allocate a rows of uv.
|
||||
@ -605,6 +613,14 @@ int ARGBToNV21(const uint8_t* src_argb,
|
||||
MergeUVRow_ = MergeUVRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_MERGEUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
MergeUVRow_ = MergeUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(halfwidth, 16)) {
|
||||
MergeUVRow_ = MergeUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
// Allocate a rows of uv.
|
||||
@ -768,6 +784,14 @@ int ABGRToNV12(const uint8_t* src_abgr,
|
||||
MergeUVRow_ = MergeUVRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_MERGEUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
MergeUVRow_ = MergeUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(halfwidth, 16)) {
|
||||
MergeUVRow_ = MergeUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
// Allocate a rows of uv.
|
||||
@ -932,6 +956,14 @@ int ABGRToNV21(const uint8_t* src_abgr,
|
||||
MergeUVRow_ = MergeUVRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_MERGEUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
MergeUVRow_ = MergeUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(halfwidth, 16)) {
|
||||
MergeUVRow_ = MergeUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
// Allocate a rows of uv.
|
||||
@ -2117,6 +2149,16 @@ int ARGBToJ420(const uint8_t* src_argb,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBTOYJROW_LSX) && defined(HAS_ARGBTOUVJROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGBToYJRow = ARGBToYJRow_Any_LSX;
|
||||
ARGBToUVJRow = ARGBToUVJRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ARGBToYJRow = ARGBToYJRow_LSX;
|
||||
ARGBToUVJRow = ARGBToUVJRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height - 1; y += 2) {
|
||||
ARGBToUVJRow(src_argb, src_stride_argb, dst_u, dst_v, width);
|
||||
@ -2232,6 +2274,16 @@ int ARGBToJ422(const uint8_t* src_argb,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBTOYJROW_LSX) && defined(HAS_ARGBTOUVJROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGBToYJRow = ARGBToYJRow_Any_LSX;
|
||||
ARGBToUVJRow = ARGBToUVJRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ARGBToYJRow = ARGBToYJRow_LSX;
|
||||
ARGBToUVJRow = ARGBToUVJRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
ARGBToUVJRow(src_argb, 0, dst_u, dst_v, width);
|
||||
|
||||
@ -466,6 +466,14 @@ void SplitUVPlane(const uint8_t* src_uv,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SPLITUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
SplitUVRow = SplitUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
SplitUVRow = SplitUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
// Copy a row of UV.
|
||||
@ -541,6 +549,14 @@ void MergeUVPlane(const uint8_t* src_u,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_MERGEUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
MergeUVRow = MergeUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
MergeUVRow = MergeUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
// Merge a row of U and V into a row of UV.
|
||||
@ -2321,6 +2337,11 @@ ARGBBlendRow GetARGBBlend() {
|
||||
if (TestCpuFlag(kCpuHasMSA)) {
|
||||
ARGBBlendRow = ARGBBlendRow_MSA;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBBLENDROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGBBlendRow = ARGBBlendRow_LSX;
|
||||
}
|
||||
#endif
|
||||
return ARGBBlendRow;
|
||||
}
|
||||
@ -2904,6 +2925,14 @@ int RAWToRGB24(const uint8_t* src_raw,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_RAWTORGB24ROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
RAWToRGB24Row = RAWToRGB24Row_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
RAWToRGB24Row = RAWToRGB24Row_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
RAWToRGB24Row(src_raw, dst_rgb24, width);
|
||||
@ -2958,6 +2987,14 @@ void SetPlane(uint8_t* dst_y,
|
||||
SetRow = SetRow_MSA;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SETROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
SetRow = SetRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
SetRow = SetRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set plane
|
||||
for (y = 0; y < height; ++y) {
|
||||
@ -3055,6 +3092,14 @@ int ARGBRect(uint8_t* dst_argb,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBSETROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGBSetRow = ARGBSetRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 4)) {
|
||||
ARGBSetRow = ARGBSetRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set plane
|
||||
for (y = 0; y < height; ++y) {
|
||||
@ -3422,6 +3467,11 @@ int ARGBColorMatrix(const uint8_t* src_argb,
|
||||
if (TestCpuFlag(kCpuHasMSA) && IS_ALIGNED(width, 8)) {
|
||||
ARGBColorMatrixRow = ARGBColorMatrixRow_MSA;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBCOLORMATRIXROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) {
|
||||
ARGBColorMatrixRow = ARGBColorMatrixRow_LSX;
|
||||
}
|
||||
#endif
|
||||
for (y = 0; y < height; ++y) {
|
||||
ARGBColorMatrixRow(src_argb, dst_argb, matrix_argb, width);
|
||||
@ -3587,6 +3637,11 @@ int ARGBQuantize(uint8_t* dst_argb,
|
||||
if (TestCpuFlag(kCpuHasMSA) && IS_ALIGNED(width, 8)) {
|
||||
ARGBQuantizeRow = ARGBQuantizeRow_MSA;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBQUANTIZEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 8)) {
|
||||
ARGBQuantizeRow = ARGBQuantizeRow_LSX;
|
||||
}
|
||||
#endif
|
||||
for (y = 0; y < height; ++y) {
|
||||
ARGBQuantizeRow(dst, scale, interval_size, interval_offset, width);
|
||||
@ -3881,6 +3936,14 @@ int InterpolatePlane(const uint8_t* src0,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
InterpolateRow(dst, src0, src1 - src0, width, interpolation);
|
||||
@ -4243,6 +4306,14 @@ static int ARGBSobelize(const uint8_t* src_argb,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBTOYJROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGBToYJRow = ARGBToYJRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
ARGBToYJRow = ARGBToYJRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAS_SOBELYROW_SSE2)
|
||||
if (TestCpuFlag(kCpuHasSSE2)) {
|
||||
@ -4373,6 +4444,14 @@ int ARGBSobel(const uint8_t* src_argb,
|
||||
SobelRow = SobelRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SOBELROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
SobelRow = SobelRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
SobelRow = SobelRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return ARGBSobelize(src_argb, src_stride_argb, dst_argb, dst_stride_argb,
|
||||
width, height, SobelRow);
|
||||
@ -4419,6 +4498,14 @@ int ARGBSobelToPlane(const uint8_t* src_argb,
|
||||
SobelToPlaneRow = SobelToPlaneRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SOBELTOPLANEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
SobelToPlaneRow = SobelToPlaneRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
SobelToPlaneRow = SobelToPlaneRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return ARGBSobelize(src_argb, src_stride_argb, dst_y, dst_stride_y, width,
|
||||
height, SobelToPlaneRow);
|
||||
@ -4466,6 +4553,14 @@ int ARGBSobelXY(const uint8_t* src_argb,
|
||||
SobelXYRow = SobelXYRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SOBELXYROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
SobelXYRow = SobelXYRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 16)) {
|
||||
SobelXYRow = SobelXYRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return ARGBSobelize(src_argb, src_stride_argb, dst_argb, dst_stride_argb,
|
||||
width, height, SobelXYRow);
|
||||
@ -4590,6 +4685,14 @@ int HalfFloatPlane(const uint16_t* src_y,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_HALFFLOATROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
HalfFloatRow = HalfFloatRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
HalfFloatRow = HalfFloatRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
HalfFloatRow(src_y, dst_y, scale, width);
|
||||
@ -4776,6 +4879,12 @@ int ARGBExtractAlpha(const uint8_t* src_argb,
|
||||
: ARGBExtractAlphaRow_Any_MSA;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_ARGBEXTRACTALPHAROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_LSX
|
||||
: ARGBExtractAlphaRow_Any_LSX;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int y = 0; y < height; ++y) {
|
||||
ARGBExtractAlphaRow(src_argb, dst_a, width);
|
||||
@ -4912,6 +5021,14 @@ int YUY2ToNV12(const uint8_t* src_yuy2,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SPLITUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
SplitUVRow = SplitUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
SplitUVRow = SplitUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3)) {
|
||||
InterpolateRow = InterpolateRow_Any_SSSE3;
|
||||
@ -4952,6 +5069,14 @@ int YUY2ToNV12(const uint8_t* src_yuy2,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
int awidth = halfwidth * 2;
|
||||
@ -5044,6 +5169,14 @@ int UYVYToNV12(const uint8_t* src_uyvy,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SPLITUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
SplitUVRow = SplitUVRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
SplitUVRow = SplitUVRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3)) {
|
||||
InterpolateRow = InterpolateRow_Any_SSSE3;
|
||||
@ -5084,6 +5217,14 @@ int UYVYToNV12(const uint8_t* src_uyvy,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(width, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
int awidth = halfwidth * 2;
|
||||
|
||||
@ -366,6 +366,11 @@ void SplitRotateUV180(const uint8_t* src,
|
||||
MirrorSplitUVRow = MirrorSplitUVRow_MSA;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_MIRRORSPLITUVROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX) && IS_ALIGNED(width, 32)) {
|
||||
MirrorSplitUVRow = MirrorSplitUVRow_LSX;
|
||||
}
|
||||
#endif
|
||||
|
||||
dst_a += dst_stride_a * (height - 1);
|
||||
dst_b += dst_stride_b * (height - 1);
|
||||
|
||||
@ -436,6 +436,9 @@ ANY31C(I422ToRGB565Row_Any_LASX, I422ToRGB565Row_LASX, 1, 0, 2, 31)
|
||||
ANY31C(I422ToARGB4444Row_Any_LASX, I422ToARGB4444Row_LASX, 1, 0, 2, 31)
|
||||
ANY31C(I422ToARGB1555Row_Any_LASX, I422ToARGB1555Row_LASX, 1, 0, 2, 31)
|
||||
#endif
|
||||
#ifdef HAS_I444TOARGBROW_LSX
|
||||
ANY31C(I444ToARGBRow_Any_LSX, I444ToARGBRow_LSX, 0, 0, 4, 15)
|
||||
#endif
|
||||
#undef ANY31C
|
||||
|
||||
// Any 3 planes of 16 bit to 1 with yuvconstants
|
||||
@ -598,6 +601,9 @@ ANY21(MergeUVRow_Any_MSA, MergeUVRow_MSA, 0, 1, 1, 2, 15)
|
||||
#ifdef HAS_MERGEUVROW_MMI
|
||||
ANY21(MergeUVRow_Any_MMI, MergeUVRow_MMI, 0, 1, 1, 2, 7)
|
||||
#endif
|
||||
#ifdef HAS_MERGEUVROW_LSX
|
||||
ANY21(MergeUVRow_Any_LSX, MergeUVRow_LSX, 0, 1, 1, 2, 15)
|
||||
#endif
|
||||
#ifdef HAS_NV21TOYUV24ROW_NEON
|
||||
ANY21(NV21ToYUV24Row_Any_NEON, NV21ToYUV24Row_NEON, 1, 1, 2, 3, 15)
|
||||
#endif
|
||||
@ -674,6 +680,9 @@ ANY21(SobelRow_Any_MSA, SobelRow_MSA, 0, 1, 1, 4, 15)
|
||||
#ifdef HAS_SOBELROW_MMI
|
||||
ANY21(SobelRow_Any_MMI, SobelRow_MMI, 0, 1, 1, 4, 7)
|
||||
#endif
|
||||
#ifdef HAS_SOBELROW_LSX
|
||||
ANY21(SobelRow_Any_LSX, SobelRow_LSX, 0, 1, 1, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_SOBELTOPLANEROW_SSE2
|
||||
ANY21(SobelToPlaneRow_Any_SSE2, SobelToPlaneRow_SSE2, 0, 1, 1, 1, 15)
|
||||
#endif
|
||||
@ -686,6 +695,9 @@ ANY21(SobelToPlaneRow_Any_MSA, SobelToPlaneRow_MSA, 0, 1, 1, 1, 31)
|
||||
#ifdef HAS_SOBELTOPLANEROW_MMI
|
||||
ANY21(SobelToPlaneRow_Any_MMI, SobelToPlaneRow_MMI, 0, 1, 1, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_SOBELTOPLANEROW_LSX
|
||||
ANY21(SobelToPlaneRow_Any_LSX, SobelToPlaneRow_LSX, 0, 1, 1, 1, 31)
|
||||
#endif
|
||||
#ifdef HAS_SOBELXYROW_SSE2
|
||||
ANY21(SobelXYRow_Any_SSE2, SobelXYRow_SSE2, 0, 1, 1, 4, 15)
|
||||
#endif
|
||||
@ -698,6 +710,9 @@ ANY21(SobelXYRow_Any_MSA, SobelXYRow_MSA, 0, 1, 1, 4, 15)
|
||||
#ifdef HAS_SOBELXYROW_MMI
|
||||
ANY21(SobelXYRow_Any_MMI, SobelXYRow_MMI, 0, 1, 1, 4, 7)
|
||||
#endif
|
||||
#ifdef HAS_SOBELXYROW_LSX
|
||||
ANY21(SobelXYRow_Any_LSX, SobelXYRow_LSX, 0, 1, 1, 4, 15)
|
||||
#endif
|
||||
#undef ANY21
|
||||
|
||||
// Any 2 planes to 1 with yuvconstants
|
||||
@ -734,6 +749,9 @@ ANY21C(NV12ToARGBRow_Any_MSA, NV12ToARGBRow_MSA, 1, 1, 2, 4, 7)
|
||||
#ifdef HAS_NV12TOARGBROW_MMI
|
||||
ANY21C(NV12ToARGBRow_Any_MMI, NV12ToARGBRow_MMI, 1, 1, 2, 4, 7)
|
||||
#endif
|
||||
#ifdef HAS_NV12TOARGBROW_LSX
|
||||
ANY21C(NV12ToARGBRow_Any_LSX, NV12ToARGBRow_LSX, 1, 1, 2, 4, 7)
|
||||
#endif
|
||||
#ifdef HAS_NV21TOARGBROW_SSSE3
|
||||
ANY21C(NV21ToARGBRow_Any_SSSE3, NV21ToARGBRow_SSSE3, 1, 1, 2, 4, 7)
|
||||
#endif
|
||||
@ -749,6 +767,9 @@ ANY21C(NV21ToARGBRow_Any_MSA, NV21ToARGBRow_MSA, 1, 1, 2, 4, 7)
|
||||
#ifdef HAS_NV21TOARGBROW_MMI
|
||||
ANY21C(NV21ToARGBRow_Any_MMI, NV21ToARGBRow_MMI, 1, 1, 2, 4, 7)
|
||||
#endif
|
||||
#ifdef HAS_NV21TOARGBROW_LSX
|
||||
ANY21C(NV21ToARGBRow_Any_LSX, NV21ToARGBRow_LSX, 1, 1, 2, 4, 7)
|
||||
#endif
|
||||
#ifdef HAS_NV12TORGB24ROW_NEON
|
||||
ANY21C(NV12ToRGB24Row_Any_NEON, NV12ToRGB24Row_NEON, 1, 1, 2, 3, 7)
|
||||
#endif
|
||||
@ -788,6 +809,9 @@ ANY21C(NV12ToRGB565Row_Any_MSA, NV12ToRGB565Row_MSA, 1, 1, 2, 2, 7)
|
||||
#ifdef HAS_NV12TORGB565ROW_MMI
|
||||
ANY21C(NV12ToRGB565Row_Any_MMI, NV12ToRGB565Row_MMI, 1, 1, 2, 2, 7)
|
||||
#endif
|
||||
#ifdef HAS_NV12TORGB565ROW_LSX
|
||||
ANY21C(NV12ToRGB565Row_Any_LSX, NV12ToRGB565Row_LSX, 1, 1, 2, 2, 7)
|
||||
#endif
|
||||
#undef ANY21C
|
||||
|
||||
// Any 2 planes of 16 bit to 1 with yuvconstants
|
||||
@ -979,6 +1003,9 @@ ANY11(ARGBToRGB565Row_Any_LASX, ARGBToRGB565Row_LASX, 0, 4, 2, 15)
|
||||
ANY11(ARGBToARGB1555Row_Any_LASX, ARGBToARGB1555Row_LASX, 0, 4, 2, 15)
|
||||
ANY11(ARGBToARGB4444Row_Any_LASX, ARGBToARGB4444Row_LASX, 0, 4, 2, 15)
|
||||
#endif
|
||||
#if defined(HAS_J400TOARGBROW_LSX)
|
||||
ANY11(J400ToARGBRow_Any_LSX, J400ToARGBRow_LSX, 0, 1, 4, 15)
|
||||
#endif
|
||||
#if defined(HAS_RAWTORGB24ROW_NEON)
|
||||
ANY11(RAWToRGB24Row_Any_NEON, RAWToRGB24Row_NEON, 0, 3, 3, 7)
|
||||
#endif
|
||||
@ -988,6 +1015,9 @@ ANY11(RAWToRGB24Row_Any_MSA, RAWToRGB24Row_MSA, 0, 3, 3, 15)
|
||||
#if defined(HAS_RAWTORGB24ROW_MMI)
|
||||
ANY11(RAWToRGB24Row_Any_MMI, RAWToRGB24Row_MMI, 0, 3, 3, 3)
|
||||
#endif
|
||||
#if defined(HAS_RAWTORGB24ROW_LSX)
|
||||
ANY11(RAWToRGB24Row_Any_LSX, RAWToRGB24Row_LSX, 0, 3, 3, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGBTOYROW_AVX2
|
||||
ANY11(ARGBToYRow_Any_AVX2, ARGBToYRow_AVX2, 0, 4, 1, 31)
|
||||
#endif
|
||||
@ -1048,6 +1078,9 @@ ANY11(ARGBToYJRow_Any_MSA, ARGBToYJRow_MSA, 0, 4, 1, 15)
|
||||
#ifdef HAS_ARGBTOYJROW_MMI
|
||||
ANY11(ARGBToYJRow_Any_MMI, ARGBToYJRow_MMI, 0, 4, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_ARGBTOYJROW_LSX
|
||||
ANY11(ARGBToYJRow_Any_LSX, ARGBToYJRow_LSX, 0, 4, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_BGRATOYROW_NEON
|
||||
ANY11(BGRAToYRow_Any_NEON, BGRAToYRow_NEON, 0, 4, 1, 7)
|
||||
#endif
|
||||
@ -1057,6 +1090,9 @@ ANY11(BGRAToYRow_Any_MSA, BGRAToYRow_MSA, 0, 4, 1, 15)
|
||||
#ifdef HAS_BGRATOYROW_MMI
|
||||
ANY11(BGRAToYRow_Any_MMI, BGRAToYRow_MMI, 0, 4, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_BGRATOYROW_LSX
|
||||
ANY11(BGRAToYRow_Any_LSX, BGRAToYRow_LSX, 0, 4, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_ABGRTOYROW_NEON
|
||||
ANY11(ABGRToYRow_Any_NEON, ABGRToYRow_NEON, 0, 4, 1, 7)
|
||||
#endif
|
||||
@ -1066,6 +1102,9 @@ ANY11(ABGRToYRow_Any_MSA, ABGRToYRow_MSA, 0, 4, 1, 7)
|
||||
#ifdef HAS_ABGRTOYROW_MMI
|
||||
ANY11(ABGRToYRow_Any_MMI, ABGRToYRow_MMI, 0, 4, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_ABGRTOYROW_LSX
|
||||
ANY11(ABGRToYRow_Any_LSX, ABGRToYRow_LSX, 0, 4, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGBATOYROW_NEON
|
||||
ANY11(RGBAToYRow_Any_NEON, RGBAToYRow_NEON, 0, 4, 1, 7)
|
||||
#endif
|
||||
@ -1075,6 +1114,9 @@ ANY11(RGBAToYRow_Any_MSA, RGBAToYRow_MSA, 0, 4, 1, 15)
|
||||
#ifdef HAS_RGBATOYROW_MMI
|
||||
ANY11(RGBAToYRow_Any_MMI, RGBAToYRow_MMI, 0, 4, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_RGBATOYROW_LSX
|
||||
ANY11(RGBAToYRow_Any_LSX, RGBAToYRow_LSX, 0, 4, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGB24TOYROW_NEON
|
||||
ANY11(RGB24ToYRow_Any_NEON, RGB24ToYRow_NEON, 0, 3, 1, 7)
|
||||
#endif
|
||||
@ -1093,6 +1135,9 @@ ANY11(RGB24ToYRow_Any_MSA, RGB24ToYRow_MSA, 0, 3, 1, 15)
|
||||
#ifdef HAS_RGB24TOYROW_MMI
|
||||
ANY11(RGB24ToYRow_Any_MMI, RGB24ToYRow_MMI, 0, 3, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_RGB24TOYROW_LSX
|
||||
ANY11(RGB24ToYRow_Any_LSX, RGB24ToYRow_LSX, 0, 3, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_RAWTOYROW_NEON
|
||||
ANY11(RAWToYRow_Any_NEON, RAWToYRow_NEON, 0, 3, 1, 7)
|
||||
#endif
|
||||
@ -1111,6 +1156,9 @@ ANY11(RAWToYRow_Any_MSA, RAWToYRow_MSA, 0, 3, 1, 15)
|
||||
#ifdef HAS_RAWTOYROW_MMI
|
||||
ANY11(RAWToYRow_Any_MMI, RAWToYRow_MMI, 0, 3, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_RAWTOYROW_LSX
|
||||
ANY11(RAWToYRow_Any_LSX, RAWToYRow_LSX, 0, 3, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGB565TOYROW_NEON
|
||||
ANY11(RGB565ToYRow_Any_NEON, RGB565ToYRow_NEON, 0, 2, 1, 7)
|
||||
#endif
|
||||
@ -1120,6 +1168,9 @@ ANY11(RGB565ToYRow_Any_MSA, RGB565ToYRow_MSA, 0, 2, 1, 15)
|
||||
#ifdef HAS_RGB565TOYROW_MMI
|
||||
ANY11(RGB565ToYRow_Any_MMI, RGB565ToYRow_MMI, 0, 2, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_RGB565TOYROW_LSX
|
||||
ANY11(RGB565ToYRow_Any_LSX, RGB565ToYRow_LSX, 0, 2, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGB1555TOYROW_NEON
|
||||
ANY11(ARGB1555ToYRow_Any_NEON, ARGB1555ToYRow_NEON, 0, 2, 1, 7)
|
||||
#endif
|
||||
@ -1129,6 +1180,9 @@ ANY11(ARGB1555ToYRow_Any_MSA, ARGB1555ToYRow_MSA, 0, 2, 1, 15)
|
||||
#ifdef HAS_ARGB1555TOYROW_MMI
|
||||
ANY11(ARGB1555ToYRow_Any_MMI, ARGB1555ToYRow_MMI, 0, 2, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_ARGB1555TOYROW_LSX
|
||||
ANY11(ARGB1555ToYRow_Any_LSX, ARGB1555ToYRow_LSX, 0, 2, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGB4444TOYROW_NEON
|
||||
ANY11(ARGB4444ToYRow_Any_NEON, ARGB4444ToYRow_NEON, 0, 2, 1, 7)
|
||||
#endif
|
||||
@ -1180,6 +1234,9 @@ ANY11(RGB24ToARGBRow_Any_MSA, RGB24ToARGBRow_MSA, 0, 3, 4, 15)
|
||||
#ifdef HAS_RGB24TOARGBROW_MMI
|
||||
ANY11(RGB24ToARGBRow_Any_MMI, RGB24ToARGBRow_MMI, 0, 3, 4, 3)
|
||||
#endif
|
||||
#ifdef HAS_RGB24TOARGBROW_LSX
|
||||
ANY11(RGB24ToARGBRow_Any_LSX, RGB24ToARGBRow_LSX, 0, 3, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_RAWTOARGBROW_NEON
|
||||
ANY11(RAWToARGBRow_Any_NEON, RAWToARGBRow_NEON, 0, 3, 4, 7)
|
||||
#endif
|
||||
@ -1192,6 +1249,9 @@ ANY11(RAWToARGBRow_Any_MSA, RAWToARGBRow_MSA, 0, 3, 4, 15)
|
||||
#ifdef HAS_RAWTOARGBROW_MMI
|
||||
ANY11(RAWToARGBRow_Any_MMI, RAWToARGBRow_MMI, 0, 3, 4, 3)
|
||||
#endif
|
||||
#ifdef HAS_RAWTOARGBROW_LSX
|
||||
ANY11(RAWToARGBRow_Any_LSX, RAWToARGBRow_LSX, 0, 3, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGB565TOARGBROW_NEON
|
||||
ANY11(RGB565ToARGBRow_Any_NEON, RGB565ToARGBRow_NEON, 0, 2, 4, 7)
|
||||
#endif
|
||||
@ -1201,6 +1261,9 @@ ANY11(RGB565ToARGBRow_Any_MSA, RGB565ToARGBRow_MSA, 0, 2, 4, 15)
|
||||
#ifdef HAS_RGB565TOARGBROW_MMI
|
||||
ANY11(RGB565ToARGBRow_Any_MMI, RGB565ToARGBRow_MMI, 0, 2, 4, 3)
|
||||
#endif
|
||||
#ifdef HAS_RGB565TOARGBROW_LSX
|
||||
ANY11(RGB565ToARGBRow_Any_LSX, RGB565ToARGBRow_LSX, 0, 2, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGB1555TOARGBROW_NEON
|
||||
ANY11(ARGB1555ToARGBRow_Any_NEON, ARGB1555ToARGBRow_NEON, 0, 2, 4, 7)
|
||||
#endif
|
||||
@ -1210,6 +1273,9 @@ ANY11(ARGB1555ToARGBRow_Any_MSA, ARGB1555ToARGBRow_MSA, 0, 2, 4, 15)
|
||||
#ifdef HAS_ARGB1555TOARGBROW_MMI
|
||||
ANY11(ARGB1555ToARGBRow_Any_MMI, ARGB1555ToARGBRow_MMI, 0, 2, 4, 3)
|
||||
#endif
|
||||
#ifdef HAS_ARGB1555TOARGBROW_LSX
|
||||
ANY11(ARGB1555ToARGBRow_Any_LSX, ARGB1555ToARGBRow_LSX, 0, 2, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGB4444TOARGBROW_NEON
|
||||
ANY11(ARGB4444ToARGBRow_Any_NEON, ARGB4444ToARGBRow_NEON, 0, 2, 4, 7)
|
||||
#endif
|
||||
@ -1219,6 +1285,9 @@ ANY11(ARGB4444ToARGBRow_Any_MSA, ARGB4444ToARGBRow_MSA, 0, 2, 4, 15)
|
||||
#ifdef HAS_ARGB4444TOARGBROW_MMI
|
||||
ANY11(ARGB4444ToARGBRow_Any_MMI, ARGB4444ToARGBRow_MMI, 0, 2, 4, 3)
|
||||
#endif
|
||||
#ifdef HAS_ARGB4444TOARGBROW_LSX
|
||||
ANY11(ARGB4444ToARGBRow_Any_LSX, ARGB4444ToARGBRow_LSX, 0, 2, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGBATTENUATEROW_SSSE3
|
||||
ANY11(ARGBAttenuateRow_Any_SSSE3, ARGBAttenuateRow_SSSE3, 0, 4, 4, 3)
|
||||
#endif
|
||||
@ -1258,6 +1327,9 @@ ANY11(ARGBExtractAlphaRow_Any_MSA, ARGBExtractAlphaRow_MSA, 0, 4, 1, 15)
|
||||
#ifdef HAS_ARGBEXTRACTALPHAROW_MMI
|
||||
ANY11(ARGBExtractAlphaRow_Any_MMI, ARGBExtractAlphaRow_MMI, 0, 4, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_ARGBEXTRACTALPHAROW_LSX
|
||||
ANY11(ARGBExtractAlphaRow_Any_LSX, ARGBExtractAlphaRow_LSX, 0, 4, 1, 15)
|
||||
#endif
|
||||
#undef ANY11
|
||||
|
||||
// Any 1 to 1 blended. Destination is read, modify, write.
|
||||
@ -1351,6 +1423,14 @@ ANY11P(I400ToARGBRow_Any_MMI,
|
||||
4,
|
||||
7)
|
||||
#endif
|
||||
#if defined(HAS_I400TOARGBROW_LSX)
|
||||
ANY11P(I400ToARGBRow_Any_LSX,
|
||||
I400ToARGBRow_LSX,
|
||||
const struct YuvConstants*,
|
||||
1,
|
||||
4,
|
||||
15)
|
||||
#endif
|
||||
|
||||
#if defined(HAS_ARGBTORGB565DITHERROW_SSE2)
|
||||
ANY11P(ARGBToRGB565DitherRow_Any_SSE2,
|
||||
@ -1613,6 +1693,9 @@ ANY11P16(HalfFloatRow_Any_MSA, HalfFloatRow_MSA, uint16_t, uint16_t, 2, 2, 31)
|
||||
#ifdef HAS_BYTETOFLOATROW_NEON
|
||||
ANY11P16(ByteToFloatRow_Any_NEON, ByteToFloatRow_NEON, uint8_t, float, 1, 3, 7)
|
||||
#endif
|
||||
#ifdef HAS_HALFFLOATROW_LSX
|
||||
ANY11P16(HalfFloatRow_Any_LSX, HalfFloatRow_LSX, uint16_t, uint16_t, 2, 2, 31)
|
||||
#endif
|
||||
#undef ANY11P16
|
||||
|
||||
// Any 1 to 1 with yuvconstants
|
||||
@ -1650,6 +1733,10 @@ ANY11C(UYVYToARGBRow_Any_MSA, UYVYToARGBRow_MSA, 1, 4, 4, 7)
|
||||
ANY11C(YUY2ToARGBRow_Any_MMI, YUY2ToARGBRow_MMI, 1, 4, 4, 7)
|
||||
ANY11C(UYVYToARGBRow_Any_MMI, UYVYToARGBRow_MMI, 1, 4, 4, 7)
|
||||
#endif
|
||||
#if defined(HAS_YUY2TOARGBROW_LSX)
|
||||
ANY11C(YUY2ToARGBRow_Any_LSX, YUY2ToARGBRow_LSX, 1, 4, 4, 7)
|
||||
ANY11C(UYVYToARGBRow_Any_LSX, UYVYToARGBRow_LSX, 1, 4, 4, 7)
|
||||
#endif
|
||||
#undef ANY11C
|
||||
|
||||
// Any 1 to 1 interpolate. Takes 2 rows of source via stride.
|
||||
@ -1684,6 +1771,9 @@ ANY11I(InterpolateRow_Any_MSA, InterpolateRow_MSA, 1, 1, 31)
|
||||
#ifdef HAS_INTERPOLATEROW_MMI
|
||||
ANY11I(InterpolateRow_Any_MMI, InterpolateRow_MMI, 1, 1, 7)
|
||||
#endif
|
||||
#ifdef HAS_INTERPOLATEROW_LSX
|
||||
ANY11I(InterpolateRow_Any_LSX, InterpolateRow_LSX, 1, 1, 31)
|
||||
#endif
|
||||
#undef ANY11I
|
||||
|
||||
// Any 1 to 1 mirror.
|
||||
@ -1780,6 +1870,9 @@ ANY1(SetRow_Any_X86, SetRow_X86, uint8_t, 1, 3)
|
||||
#ifdef HAS_SETROW_NEON
|
||||
ANY1(SetRow_Any_NEON, SetRow_NEON, uint8_t, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_SETROW_LSX
|
||||
ANY1(SetRow_Any_LSX, SetRow_LSX, uint8_t, 1, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGBSETROW_NEON
|
||||
ANY1(ARGBSetRow_Any_NEON, ARGBSetRow_NEON, uint32_t, 4, 3)
|
||||
#endif
|
||||
@ -1789,6 +1882,9 @@ ANY1(ARGBSetRow_Any_MSA, ARGBSetRow_MSA, uint32_t, 4, 3)
|
||||
#ifdef HAS_ARGBSETROW_MMI
|
||||
ANY1(ARGBSetRow_Any_MMI, ARGBSetRow_MMI, uint32_t, 4, 3)
|
||||
#endif
|
||||
#ifdef HAS_ARGBSETROW_LSX
|
||||
ANY1(ARGBSetRow_Any_LSX, ARGBSetRow_LSX, uint32_t, 4, 3)
|
||||
#endif
|
||||
#undef ANY1
|
||||
|
||||
// Any 1 to 2. Outputs UV planes.
|
||||
@ -1823,6 +1919,9 @@ ANY12(SplitUVRow_Any_MSA, SplitUVRow_MSA, 0, 2, 0, 31)
|
||||
#ifdef HAS_SPLITUVROW_MMI
|
||||
ANY12(SplitUVRow_Any_MMI, SplitUVRow_MMI, 0, 2, 0, 7)
|
||||
#endif
|
||||
#ifdef HAS_SPLITUVROW_LSX
|
||||
ANY12(SplitUVRow_Any_LSX, SplitUVRow_LSX, 0, 2, 0, 31)
|
||||
#endif
|
||||
#ifdef HAS_ARGBTOUV444ROW_SSSE3
|
||||
ANY12(ARGBToUV444Row_Any_SSSE3, ARGBToUV444Row_SSSE3, 0, 4, 0, 15)
|
||||
#endif
|
||||
@ -2026,12 +2125,18 @@ ANY12S(ARGBToUVJRow_Any_MSA, ARGBToUVJRow_MSA, 0, 4, 31)
|
||||
#ifdef HAS_ARGBTOUVJROW_MMI
|
||||
ANY12S(ARGBToUVJRow_Any_MMI, ARGBToUVJRow_MMI, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGBTOUVJROW_LSX
|
||||
ANY12S(ARGBToUVJRow_Any_LSX, ARGBToUVJRow_LSX, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_BGRATOUVROW_NEON
|
||||
ANY12S(BGRAToUVRow_Any_NEON, BGRAToUVRow_NEON, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_BGRATOUVROW_MSA
|
||||
ANY12S(BGRAToUVRow_Any_MSA, BGRAToUVRow_MSA, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_BGRATOUVROW_LSX
|
||||
ANY12S(BGRAToUVRow_Any_LSX, BGRAToUVRow_LSX, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_BGRATOUVROW_MMI
|
||||
ANY12S(BGRAToUVRow_Any_MMI, BGRAToUVRow_MMI, 0, 4, 15)
|
||||
#endif
|
||||
@ -2044,6 +2149,9 @@ ANY12S(ABGRToUVRow_Any_MSA, ABGRToUVRow_MSA, 0, 4, 15)
|
||||
#ifdef HAS_ABGRTOUVROW_MMI
|
||||
ANY12S(ABGRToUVRow_Any_MMI, ABGRToUVRow_MMI, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_ABGRTOUVROW_LSX
|
||||
ANY12S(ABGRToUVRow_Any_LSX, ABGRToUVRow_LSX, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGBATOUVROW_NEON
|
||||
ANY12S(RGBAToUVRow_Any_NEON, RGBAToUVRow_NEON, 0, 4, 15)
|
||||
#endif
|
||||
@ -2053,6 +2161,9 @@ ANY12S(RGBAToUVRow_Any_MSA, RGBAToUVRow_MSA, 0, 4, 15)
|
||||
#ifdef HAS_RGBATOUVROW_MMI
|
||||
ANY12S(RGBAToUVRow_Any_MMI, RGBAToUVRow_MMI, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGBATOUVROW_LSX
|
||||
ANY12S(RGBAToUVRow_Any_LSX, RGBAToUVRow_LSX, 0, 4, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGB24TOUVROW_NEON
|
||||
ANY12S(RGB24ToUVRow_Any_NEON, RGB24ToUVRow_NEON, 0, 3, 15)
|
||||
#endif
|
||||
@ -2065,6 +2176,9 @@ ANY12S(RGB24ToUVRow_Any_MSA, RGB24ToUVRow_MSA, 0, 3, 15)
|
||||
#ifdef HAS_RGB24TOUVROW_MMI
|
||||
ANY12S(RGB24ToUVRow_Any_MMI, RGB24ToUVRow_MMI, 0, 3, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGB24TOUVROW_LSX
|
||||
ANY12S(RGB24ToUVRow_Any_LSX, RGB24ToUVRow_LSX, 0, 3, 15)
|
||||
#endif
|
||||
#ifdef HAS_RAWTOUVROW_NEON
|
||||
ANY12S(RAWToUVRow_Any_NEON, RAWToUVRow_NEON, 0, 3, 15)
|
||||
#endif
|
||||
@ -2077,6 +2191,9 @@ ANY12S(RAWToUVRow_Any_MSA, RAWToUVRow_MSA, 0, 3, 15)
|
||||
#ifdef HAS_RAWTOUVROW_MMI
|
||||
ANY12S(RAWToUVRow_Any_MMI, RAWToUVRow_MMI, 0, 3, 15)
|
||||
#endif
|
||||
#ifdef HAS_RAWTOUVROW_LSX
|
||||
ANY12S(RAWToUVRow_Any_LSX, RAWToUVRow_LSX, 0, 3, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGB565TOUVROW_NEON
|
||||
ANY12S(RGB565ToUVRow_Any_NEON, RGB565ToUVRow_NEON, 0, 2, 15)
|
||||
#endif
|
||||
@ -2086,6 +2203,9 @@ ANY12S(RGB565ToUVRow_Any_MSA, RGB565ToUVRow_MSA, 0, 2, 15)
|
||||
#ifdef HAS_RGB565TOUVROW_MMI
|
||||
ANY12S(RGB565ToUVRow_Any_MMI, RGB565ToUVRow_MMI, 0, 2, 15)
|
||||
#endif
|
||||
#ifdef HAS_RGB565TOUVROW_LSX
|
||||
ANY12S(RGB565ToUVRow_Any_LSX, RGB565ToUVRow_LSX, 0, 2, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGB1555TOUVROW_NEON
|
||||
ANY12S(ARGB1555ToUVRow_Any_NEON, ARGB1555ToUVRow_NEON, 0, 2, 15)
|
||||
#endif
|
||||
@ -2095,6 +2215,9 @@ ANY12S(ARGB1555ToUVRow_Any_MSA, ARGB1555ToUVRow_MSA, 0, 2, 15)
|
||||
#ifdef HAS_ARGB1555TOUVROW_MMI
|
||||
ANY12S(ARGB1555ToUVRow_Any_MMI, ARGB1555ToUVRow_MMI, 0, 2, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGB1555TOUVROW_LSX
|
||||
ANY12S(ARGB1555ToUVRow_Any_LSX, ARGB1555ToUVRow_LSX, 0, 2, 15)
|
||||
#endif
|
||||
#ifdef HAS_ARGB4444TOUVROW_NEON
|
||||
ANY12S(ARGB4444ToUVRow_Any_NEON, ARGB4444ToUVRow_NEON, 0, 2, 15)
|
||||
#endif
|
||||
|
||||
1817
source/row_lsx.cc
Normal file
1817
source/row_lsx.cc
Normal file
File diff suppressed because it is too large
Load Diff
@ -1059,6 +1059,14 @@ void ScalePlaneBilinearDown(int src_width,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(src_width, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAS_SCALEFILTERCOLS_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
|
||||
|
||||
@ -340,6 +340,14 @@ static void ScaleARGBBilinearDown(int src_width,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(clip_src_width, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SCALEARGBFILTERCOLS_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
|
||||
ScaleARGBFilterCols = ScaleARGBFilterCols_SSSE3;
|
||||
@ -451,6 +459,14 @@ static void ScaleARGBBilinearUp(int src_width,
|
||||
InterpolateRow = InterpolateRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(dst_width, 8)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (src_width >= 32768) {
|
||||
ScaleARGBFilterCols =
|
||||
@ -687,6 +703,14 @@ static void ScaleYUVToARGBBilinearUp(int src_width,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(dst_width, 8)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void (*ScaleARGBFilterCols)(uint8_t * dst_argb, const uint8_t* src_argb,
|
||||
int dst_width, int x, int dx) =
|
||||
|
||||
@ -1518,6 +1518,14 @@ void ScalePlaneVertical(int src_height,
|
||||
InterpolateRow = InterpolateRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(dst_width_bytes, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (j = 0; j < dst_height; ++j) {
|
||||
int yi;
|
||||
|
||||
@ -415,6 +415,14 @@ static void ScaleUVBilinearDown(int src_width,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(clip_src_width, 32)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_SCALEUVFILTERCOLS_SSSE3)
|
||||
if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
|
||||
ScaleUVFilterCols = ScaleUVFilterCols_SSSE3;
|
||||
@ -528,6 +536,14 @@ static void ScaleUVBilinearUp(int src_width,
|
||||
InterpolateRow = InterpolateRow_MSA;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(HAS_INTERPOLATEROW_LSX)
|
||||
if (TestCpuFlag(kCpuHasLSX)) {
|
||||
InterpolateRow = InterpolateRow_Any_LSX;
|
||||
if (IS_ALIGNED(dst_width, 16)) {
|
||||
InterpolateRow = InterpolateRow_LSX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (src_width >= 32768) {
|
||||
ScaleUVFilterCols = filtering ? ScaleUVFilterCols64_C : ScaleUVCols64_C;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user