diff --git a/CMakeLists.txt b/CMakeLists.txt index cfc4cc128..9ad991bef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,6 +361,7 @@ if(PNG_HARDWARE_OPTIMIZATIONS) add_definitions(-DPNG_RISCV_RVV_OPT=2) elseif(PNG_RISCV_RVV STREQUAL "check") add_definitions(-DPNG_RISCV_RVV_CHECK_SUPPORTED) + add_definitions(-DPNG_RISCV_RVV_OPT=1) endif() else() add_definitions(-DPNG_RISCV_RVV_OPT=0) diff --git a/pngpriv.h b/pngpriv.h index cb44a6aec..e3054b90a 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -154,11 +154,7 @@ * to configure or put -DPNG_RISCV_RVV_OPT=2 in CPPFLAGS. */ -# if defined(__riscv) && defined(PNG_ALIGNED_MEMORY_SUPPORTED) -# define PNG_RISCV_RVV_OPT 1 -# else -# define PNG_RISCV_RVV_OPT 0 -# endif +# define PNG_RISCV_RVV_OPT 0 #endif #if PNG_ARM_NEON_OPT > 0