@@ -1552,19 +1552,25 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
1552
1552
if ( src.cols == 1 )
1553
1553
ksize.width = 1 ;
1554
1554
}
1555
- #ifdef HAVE_TEGRA_OPTIMIZATION
1556
- if ( tegra::useTegra () && tegra::box (src, dst, ksize, anchor, normalize, borderType) )
1557
- return ;
1558
- #endif
1559
-
1560
- CV_IPP_RUN_FAST (ipp_boxfilter (src, dst, ksize, anchor, normalize, borderType));
1561
1555
1562
1556
Point ofs;
1563
1557
Size wsz (src.cols , src.rows );
1564
1558
if (!(borderType&BORDER_ISOLATED))
1565
1559
src.locateROI ( wsz, ofs );
1566
1560
borderType = (borderType&~BORDER_ISOLATED);
1567
1561
1562
+ CvRect margin = cvRect (ofs.x , ofs.y , wsz.width - src.cols - ofs.x , wsz.height - src.rows - ofs.y );
1563
+
1564
+ CALL_HAL (boxFilter, cv_hal_boxFilter, sdepth, ddepth, src.ptr (), src.step , dst.ptr (), dst.step ,
1565
+ (CvSize)(ksize), (CvPoint)(anchor), normalize, borderType, margin, src.cols , src.rows , cn);
1566
+
1567
+ #ifdef HAVE_TEGRA_OPTIMIZATION
1568
+ if ( tegra::useTegra () && tegra::box (src, dst, ksize, anchor, normalize, borderType) )
1569
+ return ;
1570
+ #endif
1571
+
1572
+ CV_IPP_RUN_FAST (ipp_boxfilter (src, dst, ksize, anchor, normalize, borderType));
1573
+
1568
1574
Ptr<FilterEngine> f = createBoxFilter ( src.type (), dst.type (),
1569
1575
ksize, anchor, normalize, borderType );
1570
1576
0 commit comments