@@ -64,14 +64,6 @@ static inline int borderInterpolate( int p, int len, int borderType )
64
64
}
65
65
while ( (unsigned )p >= (unsigned )len );
66
66
}
67
- else if ( borderType == BORDER_WRAP )
68
- {
69
- CV_Assert (len > 0 );
70
- if ( p < 0 )
71
- p -= ((p-len+1 )/len)*len;
72
- if ( p >= len )
73
- p %= len;
74
- }
75
67
else if ( borderType == BORDER_CONSTANT )
76
68
p = -1 ;
77
69
return p;
@@ -100,6 +92,8 @@ inline int filterInit(cvhalFilter2D** context, uchar* kernel_data, size_t kernel
100
92
return CV_HAL_ERROR_NOT_IMPLEMENTED;
101
93
if (kernel_width != 3 && kernel_width != 5 )
102
94
return CV_HAL_ERROR_NOT_IMPLEMENTED;
95
+ if ((borderType & ~BORDER_ISOLATED) == BORDER_WRAP)
96
+ return CV_HAL_ERROR_NOT_IMPLEMENTED;
103
97
104
98
anchor_x = anchor_x < 0 ? kernel_width / 2 : anchor_x;
105
99
anchor_y = anchor_y < 0 ? kernel_height / 2 : anchor_y;
@@ -349,6 +343,8 @@ inline int sepFilterInit(cvhalFilter2D **context, int src_type, int dst_type, in
349
343
return CV_HAL_ERROR_NOT_IMPLEMENTED;
350
344
if (kernelx_length != 3 && kernelx_length != 5 )
351
345
return CV_HAL_ERROR_NOT_IMPLEMENTED;
346
+ if ((borderType & ~BORDER_ISOLATED) == BORDER_WRAP)
347
+ return CV_HAL_ERROR_NOT_IMPLEMENTED;
352
348
353
349
anchor_x = anchor_x < 0 ? kernelx_length / 2 : anchor_x;
354
350
anchor_y = anchor_y < 0 ? kernely_length / 2 : anchor_y;
@@ -568,6 +564,8 @@ inline int morphInit(cvhalFilter2D** context, int operation, int src_type, int d
568
564
return CV_HAL_ERROR_NOT_IMPLEMENTED;
569
565
if (operation != CV_HAL_MORPH_ERODE && operation != CV_HAL_MORPH_DILATE)
570
566
return CV_HAL_ERROR_NOT_IMPLEMENTED;
567
+ if ((borderType & ~BORDER_ISOLATED) == BORDER_WRAP)
568
+ return CV_HAL_ERROR_NOT_IMPLEMENTED;
571
569
572
570
uchar* borderV;
573
571
if (src_type == CV_8UC1)
@@ -706,7 +704,6 @@ static inline int morph(int start, int end, Morph2D* data, const uchar* src_data
706
704
for (int j = 0 ; j < width; j++)
707
705
process (i, j);
708
706
}
709
- // continue;
710
707
else
711
708
{
712
709
for (int j = 0 ; j < left; j++)
0 commit comments