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
925d0cc7
Commit
925d0cc7
authored
Oct 08, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test for box filter 16u, fixed bug #2416
parent
280ecb68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
smooth.cpp
modules/imgproc/src/smooth.cpp
+2
-2
test_filter.cpp
modules/imgproc/test/test_filter.cpp
+9
-1
No files found.
modules/imgproc/src/smooth.cpp
View file @
925d0cc7
...
...
@@ -556,7 +556,7 @@ template<> struct ColumnSum<int, ushort> : public BaseColumnFilter
__m128i
_res
=
_mm_cvtps_epi32
(
_mm_mul_ps
(
scale4
,
_mm_cvtepi32_ps
(
_s0
)));
_res
=
_mm_sub_epi32
(
_res
,
delta0
);
_res
=
_mm_add_epi16
(
_mm_packs_epi
16
(
_res
,
_res
),
delta1
);
_res
=
_mm_add_epi16
(
_mm_packs_epi
32
(
_res
,
_res
),
delta1
);
_mm_storel_epi64
((
__m128i
*
)(
D
+
i
),
_res
);
_mm_storeu_si128
((
__m128i
*
)(
SUM
+
i
),
_mm_sub_epi32
(
_s0
,
_sm
));
...
...
@@ -586,7 +586,7 @@ template<> struct ColumnSum<int, ushort> : public BaseColumnFilter
_mm_loadu_si128
((
const
__m128i
*
)(
Sp
+
i
)));
__m128i
_res
=
_mm_sub_epi32
(
_s0
,
delta0
);
_res
=
_mm_add_epi16
(
_mm_packs_epi
16
(
_res
,
_res
),
delta1
);
_res
=
_mm_add_epi16
(
_mm_packs_epi
32
(
_res
,
_res
),
delta1
);
_mm_storel_epi64
((
__m128i
*
)(
D
+
i
),
_res
);
_mm_storeu_si128
((
__m128i
*
)(
SUM
+
i
),
_mm_sub_epi32
(
_s0
,
_sm
));
...
...
modules/imgproc/test/test_filter.cpp
View file @
925d0cc7
...
...
@@ -110,6 +110,11 @@ void CV_FilterBaseTest::get_minmax_bounds( int i, int j, int type, Scalar& low,
high
=
Scalar
::
all
(
2
);
}
}
else
if
(
CV_MAT_DEPTH
(
type
)
==
CV_16U
)
{
low
=
Scalar
::
all
(
0.
);
high
=
Scalar
::
all
(
40000.
);
}
else
if
(
CV_MAT_DEPTH
(
type
)
==
CV_32F
)
{
low
=
Scalar
::
all
(
-
10.
);
...
...
@@ -678,10 +683,13 @@ void CV_BlurTest::get_test_array_types_and_sizes( int test_case_idx,
{
RNG
&
rng
=
ts
->
get_rng
();
CV_SmoothBaseTest
::
get_test_array_types_and_sizes
(
test_case_idx
,
sizes
,
types
);
int
depth
=
cvtest
::
randInt
(
rng
)
%
4
;
int
cn
=
(
cvtest
::
randInt
(
rng
)
%
4
)
+
1
;
depth
=
depth
==
0
?
CV_8U
:
depth
==
1
?
CV_16U
:
depth
==
2
?
CV_16S
:
CV_32F
;
types
[
OUTPUT
][
0
]
=
types
[
REF_OUTPUT
][
0
]
=
types
[
INPUT
][
0
]
=
CV_MAKETYPE
(
depth
,
cn
);
normalize
=
cvtest
::
randInt
(
rng
)
%
2
!=
0
;
if
(
!
normalize
)
{
int
depth
=
CV_MAT_DEPTH
(
types
[
INPUT
][
0
]);
types
[
INPUT
][
0
]
=
CV_MAKETYPE
(
depth
,
1
);
types
[
OUTPUT
][
0
]
=
types
[
REF_OUTPUT
][
0
]
=
CV_MAKETYPE
(
depth
==
CV_8U
?
CV_16S
:
CV_32F
,
1
);
}
...
...
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