mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-02-09 03:06:44 +08:00
[AArch64] Add SVE2 implementation of RGB24ToARGBRow
This can make use of the existing helper functions for RAWToARGBRow_SVE2 and RAWToRGBARow_SVE2 since the layouts are similar, we just need to adjust the TBL constants to match the different input layout. Observed reduction in runtime compared to the existing Neon kernel: Cortex-A510: -25.6% Cortex-A720: -15.2% Cortex-X2: -10.2% Cortex-X4: -30.2% Bug: libyuv:973 Change-Id: Ie3676693286be90d09f0045766c3492cbc04ea64 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5638555 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Reviewed-by: Justin Green <greenjustin@google.com>
This commit is contained in:
parent
fcbe22c59c
commit
555f80f3ce
@ -603,6 +603,7 @@ extern "C" {
|
|||||||
#define HAS_RAWTOARGBROW_SVE2
|
#define HAS_RAWTOARGBROW_SVE2
|
||||||
#define HAS_RAWTORGB24ROW_SVE2
|
#define HAS_RAWTORGB24ROW_SVE2
|
||||||
#define HAS_RAWTORGBAROW_SVE2
|
#define HAS_RAWTORGBAROW_SVE2
|
||||||
|
#define HAS_RGB24TOARGBROW_SVE2
|
||||||
#define HAS_RGBATOUVROW_SVE2
|
#define HAS_RGBATOUVROW_SVE2
|
||||||
#define HAS_UYVYTOARGBROW_SVE2
|
#define HAS_UYVYTOARGBROW_SVE2
|
||||||
#define HAS_YUY2TOARGBROW_SVE2
|
#define HAS_YUY2TOARGBROW_SVE2
|
||||||
@ -3506,6 +3507,9 @@ void ARGB4444ToARGBRow_AVX2(const uint8_t* src_argb4444,
|
|||||||
void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24,
|
void RGB24ToARGBRow_NEON(const uint8_t* src_rgb24,
|
||||||
uint8_t* dst_argb,
|
uint8_t* dst_argb,
|
||||||
int width);
|
int width);
|
||||||
|
void RGB24ToARGBRow_SVE2(const uint8_t* src_rgb24,
|
||||||
|
uint8_t* dst_argb,
|
||||||
|
int width);
|
||||||
void RGB24ToARGBRow_MSA(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
|
void RGB24ToARGBRow_MSA(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 RGB24ToARGBRow_LSX(const uint8_t* src_rgb24, uint8_t* dst_argb, int width);
|
||||||
void RGB24ToARGBRow_LASX(const uint8_t* src_rgb24,
|
void RGB24ToARGBRow_LASX(const uint8_t* src_rgb24,
|
||||||
|
|||||||
@ -3475,6 +3475,11 @@ int RGB24ToARGB(const uint8_t* src_rgb24,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(HAS_RGB24TOARGBROW_SVE2)
|
||||||
|
if (TestCpuFlag(kCpuHasSVE2)) {
|
||||||
|
RGB24ToARGBRow = RGB24ToARGBRow_SVE2;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#if defined(HAS_RGB24TOARGBROW_MSA)
|
#if defined(HAS_RGB24TOARGBROW_MSA)
|
||||||
if (TestCpuFlag(kCpuHasMSA)) {
|
if (TestCpuFlag(kCpuHasMSA)) {
|
||||||
RGB24ToARGBRow = RGB24ToARGBRow_Any_MSA;
|
RGB24ToARGBRow = RGB24ToARGBRow_Any_MSA;
|
||||||
|
|||||||
@ -1178,6 +1178,13 @@ void RAWToRGBARow_SVE2(const uint8_t* src_raw, uint8_t* dst_rgba, int width) {
|
|||||||
0x000000ffU);
|
0x000000ffU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RGB24ToARGBRow_SVE2(const uint8_t* src_rgb24,
|
||||||
|
uint8_t* dst_argb,
|
||||||
|
int width) {
|
||||||
|
RAWToWXYZRow_SVE2(src_rgb24, dst_argb, width, 0xff020100U, 0x00030303U,
|
||||||
|
0xff000000U);
|
||||||
|
}
|
||||||
|
|
||||||
static const uint8_t kRAWToRGB24Indices[] = {
|
static const uint8_t kRAWToRGB24Indices[] = {
|
||||||
2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9, 14, 13, 12,
|
2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9, 14, 13, 12,
|
||||||
17, 16, 15, 20, 19, 18, 23, 22, 21, 26, 25, 24, 29, 28, 27,
|
17, 16, 15, 20, 19, 18, 23, 22, 21, 26, 25, 24, 29, 28, 27,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user