Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2dd7220

Browse filesBrowse files
amane-amehanliutong
andcommitted
Remove CV_ASSERT.
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
1 parent d9ec808 commit 2dd7220
Copy full SHA for 2dd7220

File tree

Expand file treeCollapse file tree

1 file changed

+6
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-9
lines changed

‎3rdparty/hal_rvv/hal_rvv_1p0/filter.hpp

Copy file name to clipboardExpand all lines: 3rdparty/hal_rvv/hal_rvv_1p0/filter.hpp
+6-9Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@ static inline int borderInterpolate( int p, int len, int borderType )
6464
}
6565
while( (unsigned)p >= (unsigned)len );
6666
}
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-
}
7567
else if( borderType == BORDER_CONSTANT )
7668
p = -1;
7769
return p;
@@ -100,6 +92,8 @@ inline int filterInit(cvhalFilter2D** context, uchar* kernel_data, size_t kernel
10092
return CV_HAL_ERROR_NOT_IMPLEMENTED;
10193
if (kernel_width != 3 && kernel_width != 5)
10294
return CV_HAL_ERROR_NOT_IMPLEMENTED;
95+
if ((borderType & ~BORDER_ISOLATED) == BORDER_WRAP)
96+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
10397

10498
anchor_x = anchor_x < 0 ? kernel_width / 2 : anchor_x;
10599
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
349343
return CV_HAL_ERROR_NOT_IMPLEMENTED;
350344
if (kernelx_length != 3 && kernelx_length != 5)
351345
return CV_HAL_ERROR_NOT_IMPLEMENTED;
346+
if ((borderType & ~BORDER_ISOLATED) == BORDER_WRAP)
347+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
352348

353349
anchor_x = anchor_x < 0 ? kernelx_length / 2 : anchor_x;
354350
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
568564
return CV_HAL_ERROR_NOT_IMPLEMENTED;
569565
if (operation != CV_HAL_MORPH_ERODE && operation != CV_HAL_MORPH_DILATE)
570566
return CV_HAL_ERROR_NOT_IMPLEMENTED;
567+
if ((borderType & ~BORDER_ISOLATED) == BORDER_WRAP)
568+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
571569

572570
uchar* borderV;
573571
if (src_type == CV_8UC1)
@@ -706,7 +704,6 @@ static inline int morph(int start, int end, Morph2D* data, const uchar* src_data
706704
for (int j = 0; j < width; j++)
707705
process(i, j);
708706
}
709-
// continue;
710707
else
711708
{
712709
for (int j = 0; j < left; j++)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.