diff options
author | Darren Hsieh <darren.hsieh@sifive.com> | 2023-05-09 01:39:06 -0700 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-10 19:50:56 +0000 |
commit | 497ea35688f997edb4c42ef1cdd9f2ab4efb9e29 (patch) | |
tree | f1b3303372165697ab22583783afb8c2b1525e2e /source/convert_argb.cc | |
parent | 964d963afb164e768919f5bd2284202d87a3d37c (diff) | |
download | libyuv-497ea35688f997edb4c42ef1cdd9f2ab4efb9e29.tar.gz |
Enable I444To{ARGB,RGB24}Row_RVV
Run on SiFive internal FPGA:
I444ToARGB_Opt (~16x vs scalar)
I444ToRGB24_Opt (~10x vs scalar)
LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=10
Change-Id: Idae7dc46ef648beaa14b58ba3eb56b67b17c9b3b
Signed-off-by: Darren Hsieh <darren.hsieh@sifive.com>
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4520761
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/convert_argb.cc')
-rw-r--r-- | source/convert_argb.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source/convert_argb.cc b/source/convert_argb.cc index b06ece53..62884e5d 100644 --- a/source/convert_argb.cc +++ b/source/convert_argb.cc @@ -625,6 +625,11 @@ int I444ToARGBMatrix(const uint8_t* src_y, } } #endif +#if defined(HAS_I444TOARGBROW_RVV) + if (TestCpuFlag(kCpuHasRVV)) { + I444ToARGBRow = I444ToARGBRow_RVV; + } +#endif for (y = 0; y < height; ++y) { I444ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); @@ -855,6 +860,11 @@ int I444ToRGB24Matrix(const uint8_t* src_y, } } #endif +#if defined(HAS_I444TORGB24ROW_RVV) + if (TestCpuFlag(kCpuHasRVV)) { + I444ToRGB24Row = I444ToRGB24Row_RVV; + } +#endif for (y = 0; y < height; ++y) { I444ToRGB24Row(src_y, src_u, src_v, dst_rgb24, yuvconstants, width); @@ -5913,6 +5923,11 @@ static int I420ToARGBMatrixBilinear(const uint8_t* src_y, } } #endif +#if defined(HAS_I444TOARGBROW_RVV) + if (TestCpuFlag(kCpuHasRVV)) { + I444ToARGBRow = I444ToARGBRow_RVV; + } +#endif #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) if (TestCpuFlag(kCpuHasSSE2)) { @@ -6047,6 +6062,11 @@ static int I422ToARGBMatrixLinear(const uint8_t* src_y, } } #endif +#if defined(HAS_I444TOARGBROW_RVV) + if (TestCpuFlag(kCpuHasRVV)) { + I444ToARGBRow = I444ToARGBRow_RVV; + } +#endif #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) if (TestCpuFlag(kCpuHasSSE2)) { ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; @@ -6159,6 +6179,11 @@ static int I420ToRGB24MatrixBilinear(const uint8_t* src_y, } } #endif +#if defined(HAS_I444TORGB24ROW_RVV) + if (TestCpuFlag(kCpuHasRVV)) { + I444ToRGB24Row = I444ToRGB24Row_RVV; + } +#endif #if defined(HAS_SCALEROWUP2_BILINEAR_SSE2) if (TestCpuFlag(kCpuHasSSE2)) { @@ -7625,6 +7650,11 @@ static int I422ToRGB24MatrixLinear(const uint8_t* src_y, } } #endif +#if defined(HAS_I444TORGB24ROW_RVV) + if (TestCpuFlag(kCpuHasRVV)) { + I444ToRGB24Row = I444ToRGB24Row_RVV; + } +#endif #if defined(HAS_SCALEROWUP2_LINEAR_SSE2) if (TestCpuFlag(kCpuHasSSE2)) { ScaleRowUp2_Linear = ScaleRowUp2_Linear_Any_SSE2; |