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:
13
3rdparty/libpng/patches/riscv_rvv_fix.patch
vendored
Normal file
13
3rdparty/libpng/patches/riscv_rvv_fix.patch
vendored
Normal 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);
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user