diff --git a/include/libyuv/scale_row.h b/include/libyuv/scale_row.h index c015d772d..91bcbbc1b 100644 --- a/include/libyuv/scale_row.h +++ b/include/libyuv/scale_row.h @@ -180,6 +180,7 @@ extern "C" { #if !defined(LIBYUV_DISABLE_RVV) && defined(__riscv_vector) #define HAS_SCALEADDROW_RVV +// #define HAS_SCALEARGBROWDOWNEVEN_RVV #define HAS_SCALEUVROWDOWN4_RVV #define HAS_SCALEUVROWDOWNEVEN_RVV #if __riscv_v_intrinsic == 11000 diff --git a/source/scale_argb.cc b/source/scale_argb.cc index c8e0db9e1..18bdeb86f 100644 --- a/source/scale_argb.cc +++ b/source/scale_argb.cc @@ -284,10 +284,14 @@ static void ScaleARGBDownEven(int src_width, } } #endif +#if defined(HAS_SCALEARGBROWDOWNEVENBOX_RVV) + if (filtering && TestCpuFlag(kCpuHasRVV)) { + ScaleARGBRowDownEven = ScaleARGBRowDownEvenBox_RVV; + } +#endif #if defined(HAS_SCALEARGBROWDOWNEVEN_RVV) - if (TestCpuFlag(kCpuHasRVV)) { - ScaleARGBRowDownEven = - filtering ? ScaleARGBRowDownEvenBox_RVV : ScaleARGBRowDownEven_RVV; + if (!filtering && TestCpuFlag(kCpuHasRVV)) { + ScaleARGBRowDownEven = ScaleARGBRowDownEven_RVV; } #endif diff --git a/source/scale_rvv.cc b/source/scale_rvv.cc index fd14842d1..de037e45c 100644 --- a/source/scale_rvv.cc +++ b/source/scale_rvv.cc @@ -130,6 +130,7 @@ void ScaleARGBRowDown2Box_RVV(const uint8_t* src_argb, } #endif +#ifdef HAS_SCALEARGBROWDOWNEVEN_RVV void ScaleARGBRowDownEven_RVV(const uint8_t* src_argb, ptrdiff_t src_stride, int src_stepx, @@ -148,6 +149,7 @@ void ScaleARGBRowDownEven_RVV(const uint8_t* src_argb, dst += vl; } while (w > 0); } +#endif #ifdef HAS_SCALEARGBROWDOWNEVENBOX_RVV void ScaleARGBRowDownEvenBox_RVV(const uint8_t* src_argb,