Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
dfb9c574
Commit
dfb9c574
authored
Nov 21, 2016
by
Pavel Vlasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPP 2017 filter2D fix;
filter2D IPP runtime check;
parent
fb456eb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
filter.cpp
modules/imgproc/src/filter.cpp
+25
-17
No files found.
modules/imgproc/src/filter.cpp
View file @
dfb9c574
...
...
@@ -4640,6 +4640,11 @@ struct IppFilter : public hal::Filter2D
int
ddepth
=
CV_MAT_DEPTH
(
dtype
);
int
sdepth
=
CV_MAT_DEPTH
(
stype
);
#if IPP_VERSION_X100 >= 201700 && IPP_VERSION_X100 < 201702 // IPP bug with 1x1 kernel
if
(
kernel_width
==
1
&&
kernel_height
==
1
)
return
false
;
#endif
bool
runIpp
=
true
&&
(
borderTypeNI
==
BORDER_CONSTANT
||
borderTypeNI
==
BORDER_REPLICATE
)
&&
(
sdepth
==
ddepth
)
...
...
@@ -4911,26 +4916,29 @@ Ptr<hal::Filter2D> Filter2D::create(uchar* kernel_data, size_t kernel_step, int
}
#ifdef HAVE_IPP
if
(
kernel_type
==
CV_32FC1
)
{
IppFilter
<
CV_32F
>*
impl
=
new
IppFilter
<
CV_32F
>
();
if
(
impl
->
init
(
kernel_data
,
kernel_step
,
kernel_type
,
kernel_width
,
kernel_height
,
max_width
,
max_height
,
stype
,
dtype
,
borderType
,
delta
,
anchor_x
,
anchor_y
,
isSubmatrix
,
isInplace
))
{
return
Ptr
<
hal
::
Filter2D
>
(
impl
);
CV_IPP_CHECK
()
{
if
(
kernel_type
==
CV_32FC1
)
{
IppFilter
<
CV_32F
>*
impl
=
new
IppFilter
<
CV_32F
>
();
if
(
impl
->
init
(
kernel_data
,
kernel_step
,
kernel_type
,
kernel_width
,
kernel_height
,
max_width
,
max_height
,
stype
,
dtype
,
borderType
,
delta
,
anchor_x
,
anchor_y
,
isSubmatrix
,
isInplace
))
{
return
Ptr
<
hal
::
Filter2D
>
(
impl
);
}
delete
impl
;
}
delete
impl
;
}
if
(
kernel_type
==
CV_16SC1
)
{
IppFilter
<
CV_16S
>*
impl
=
new
IppFilter
<
CV_16S
>
();
if
(
impl
->
init
(
kernel_data
,
kernel_step
,
kernel_type
,
kernel_width
,
kernel_height
,
max_width
,
max_height
,
stype
,
dtype
,
borderType
,
delta
,
anchor_x
,
anchor_y
,
isSubmatrix
,
isInplace
))
{
return
Ptr
<
hal
::
Filter2D
>
(
impl
);
if
(
kernel_type
==
CV_16SC1
)
{
IppFilter
<
CV_16S
>*
impl
=
new
IppFilter
<
CV_16S
>
();
if
(
impl
->
init
(
kernel_data
,
kernel_step
,
kernel_type
,
kernel_width
,
kernel_height
,
max_width
,
max_height
,
stype
,
dtype
,
borderType
,
delta
,
anchor_x
,
anchor_y
,
isSubmatrix
,
isInplace
))
{
return
Ptr
<
hal
::
Filter2D
>
(
impl
);
}
delete
impl
;
}
delete
impl
;
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment