From e669a955c7d3f455f8c004b8586301c44b8c4d60 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 4 Dec 2025 16:18:45 +0300 Subject: [PATCH] Disabled risc-v rvv of png_read_filter_row_paeth in libpng. --- .../patches/riscv_rvv_issue_28126.patch | 20 +++++++++++++++++++ 3rdparty/libpng/riscv/riscv_init.c | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 3rdparty/libpng/patches/riscv_rvv_issue_28126.patch diff --git a/3rdparty/libpng/patches/riscv_rvv_issue_28126.patch b/3rdparty/libpng/patches/riscv_rvv_issue_28126.patch new file mode 100644 index 0000000000..12f8e3a38e --- /dev/null +++ b/3rdparty/libpng/patches/riscv_rvv_issue_28126.patch @@ -0,0 +1,20 @@ +diff --git a/3rdparty/libpng/riscv/riscv_init.c b/3rdparty/libpng/riscv/riscv_init.c +index 36a41b54f7..f2796ebccb 100644 +--- a/3rdparty/libpng/riscv/riscv_init.c ++++ b/3rdparty/libpng/riscv/riscv_init.c +@@ -30,13 +30,13 @@ png_init_filter_functions_rvv(png_structp pp, unsigned int bpp) + if (bpp == 3) + { + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_rvv; +- pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_rvv; ++ //pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_rvv; + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_rvv; + } + else if (bpp == 4) + { + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_rvv; +- pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_rvv; ++ //pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_rvv; + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_rvv; + } + } diff --git a/3rdparty/libpng/riscv/riscv_init.c b/3rdparty/libpng/riscv/riscv_init.c index 36a41b54f7..f2796ebccb 100644 --- a/3rdparty/libpng/riscv/riscv_init.c +++ b/3rdparty/libpng/riscv/riscv_init.c @@ -30,13 +30,13 @@ png_init_filter_functions_rvv(png_structp pp, unsigned int bpp) if (bpp == 3) { pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_rvv; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_rvv; + //pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_rvv; pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_rvv; } else if (bpp == 4) { pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_rvv; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_rvv; + //pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_rvv; pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_rvv; } }