|
303 | 303 | #endif |
304 | 304 |
|
305 | 305 | #if PNG_RISCV_RVV_OPT > 0 |
| 306 | +#if __riscv_v >= 1000000 && __riscv_v < 1900000 |
306 | 307 | # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_rvv |
307 | 308 | # ifndef PNG_RISCV_RVV_IMPLEMENTATION |
308 | 309 | /* Use the intrinsics code by default. */ |
309 | 310 | # define PNG_RISCV_RVV_IMPLEMENTATION 1 |
310 | 311 | # endif |
311 | 312 | #else |
312 | 313 | # define PNG_RISCV_RVV_IMPLEMENTATION 0 |
313 | | -#endif |
| 314 | +#endif /* __riscv_v >= 1000000 && __riscv_v < 1900000 */ |
| 315 | +#endif /* PNG_RISCV_RVV_OPT > 0 */ |
314 | 316 |
|
315 | 317 | /* Is this a build of a DLL where compilation of the object modules requires |
316 | 318 | * different preprocessor settings to those required for a simple library? If |
@@ -1546,7 +1548,7 @@ PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_lsx,(png_row_infop |
1546 | 1548 | row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); |
1547 | 1549 | #endif |
1548 | 1550 |
|
1549 | | -#if PNG_RISCV_RVV_OPT > 0 |
| 1551 | +#if PNG_RISCV_RVV_IMPLEMENTATION == 1 |
1550 | 1552 | PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_rvv,(png_row_infop |
1551 | 1553 | row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); |
1552 | 1554 | PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_rvv,(png_row_infop |
@@ -2175,7 +2177,7 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_lsx, |
2175 | 2177 | (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); |
2176 | 2178 | #endif |
2177 | 2179 |
|
2178 | | -# if PNG_RISCV_RVV_OPT > 0 |
| 2180 | +# if PNG_RISCV_RVV_IMPLEMENTATION == 1 |
2179 | 2181 | PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_rvv, |
2180 | 2182 | (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); |
2181 | 2183 | #endif |
|
0 commit comments