diff options
author | Bruce Lai <bruce.lai@sifive.com> | 2023-05-10 18:51:49 -0700 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-16 19:20:49 +0000 |
commit | 11d4536002b4748ff3ed795ce893335bbb5f79fe (patch) | |
tree | f55eae84acd0493e361cc897c56c499bcfe7aef2 /source/planar_functions.cc | |
parent | 6a68b18a9680ddb16b1397118675c146c6afbd65 (diff) | |
download | libyuv-11d4536002b4748ff3ed795ce893335bbb5f79fe.tar.gz |
Enable I{422,444}AlphaToARGBRow_RVV & ARGBAttentuateRow_RVV
Run on SiFive internal FPGA:
I444AlphaToARGB_Opt (~16x vs scalar)
I422AlphaToARGB_Opt (~10x vs scalar)
ARGBAttenuate_Opt (~3x vs scalar)
LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=10
Change-Id: I0046eb7af8104bc8e13cee1cb91a19f90940d5b0
Signed-off-by: Bruce Lai <bruce.lai@sifive.com>
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4535657
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/planar_functions.cc')
-rw-r--r-- | source/planar_functions.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/planar_functions.cc b/source/planar_functions.cc index 32424fb9..fd12718d 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -3566,6 +3566,11 @@ int ARGBAttenuate(const uint8_t* src_argb, } } #endif +#if defined(HAS_ARGBATTENUATEROW_RVV) + if (TestCpuFlag(kCpuHasRVV)) { + ARGBAttenuateRow = ARGBAttenuateRow_RVV; + } +#endif for (y = 0; y < height; ++y) { ARGBAttenuateRow(src_argb, dst_argb, width); |