Merge pull request #26069 from hanliutong:fix-medianBlur

Enable `CV_SIMD_SCALABLE` for median blur.
This commit is contained in:
Alexander Smorkalov 2024-08-27 16:52:36 +03:00 committed by GitHub
commit 3803eeecba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -845,7 +845,7 @@ void medianBlur(const Mat& src0, /*const*/ Mat& dst, int ksize)
CV_INSTRUMENT_REGION();
bool useSortNet = ksize == 3 || (ksize == 5
#if !(CV_SIMD)
#if !((CV_SIMD || CV_SIMD_SCALABLE))
&& ( src0.depth() > CV_8U || src0.channels() == 2 || src0.channels() > 4 )
#endif
);
@ -881,7 +881,7 @@ void medianBlur(const Mat& src0, /*const*/ Mat& dst, int ksize)
double img_size_mp = (double)(src0.total())/(1 << 20);
if( ksize <= 3 + (img_size_mp < 1 ? 12 : img_size_mp < 4 ? 6 : 2)*
(CV_SIMD ? 1 : 3))
((CV_SIMD || CV_SIMD_SCALABLE) ? 1 : 3))
medianBlur_8u_Om( src, dst, ksize );
else
medianBlur_8u_O1( src, dst, ksize );