0
0
mirror of https://github.com/opencv/opencv.git synced 2026-01-18 17:21:42 +01:00

Build fix for RISC-V RVV.

This commit is contained in:
Alexander Smorkalov
2025-12-05 08:08:36 +03:00
parent d88f080b7e
commit 98d065370c
2 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/3rdparty/libpng/riscv/filter_rvv_intrinsics.c b/3rdparty/libpng/riscv/filter_rvv_intrinsics.c
index 8d277d14cd..7e61fb89fb 100644
--- a/3rdparty/libpng/riscv/filter_rvv_intrinsics.c
+++ b/3rdparty/libpng/riscv/filter_rvv_intrinsics.c
@@ -142,7 +142,7 @@ png_read_filter_row_avg_rvv(size_t len, size_t bpp, unsigned char* row,
x = __riscv_vle8_v_u8m1(row, vl);
/* a = (a + b) / 2, round to zero with vxrm = 2 */
- a = __riscv_vaaddu_wx_u8m1(a, b, 2, vl);
+ a = __riscv_vaaddu_vv_u8m1(a, b, 2, vl);
/* a += x */
a = __riscv_vadd_vv_u8m1(a, x, vl);

View File

@@ -142,7 +142,7 @@ png_read_filter_row_avg_rvv(size_t len, size_t bpp, unsigned char* row,
x = __riscv_vle8_v_u8m1(row, vl);
/* a = (a + b) / 2, round to zero with vxrm = 2 */
a = __riscv_vaaddu_wx_u8m1(a, b, 2, vl);
a = __riscv_vaaddu_vv_u8m1(a, b, 2, vl);
/* a += x */
a = __riscv_vadd_vv_u8m1(a, x, vl);