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
507ea952
Commit
507ea952
authored
Apr 25, 2014
by
Elena Gvozdeva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
16629bff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
perf_dft.cpp
modules/core/perf/perf_dft.cpp
+6
-4
dxt.cpp
modules/core/src/dxt.cpp
+4
-7
No files found.
modules/core/perf/perf_dft.cpp
View file @
507ea952
...
...
@@ -30,19 +30,20 @@ PERF_TEST_P(Size_MatType_FlagsType, dft, TEST_MATS_DFT)
TEST_CYCLE
()
dft
(
src
,
dst
,
flags
);
SANITY_CHECK
(
dst
,
1e-5
,
ERROR_RELATIVE
);
}
///////////////////////////////////////////////////////dct//////////////////////////////////////////////////////
CV_ENUM
(
FlagsType
,
0
,
DCT_INVERSE
,
DCT_ROWS
,
DCT_INVERSE
|
DCT_ROWS
)
CV_ENUM
(
DCT_
FlagsType
,
0
,
DCT_INVERSE
,
DCT_ROWS
,
DCT_INVERSE
|
DCT_ROWS
)
typedef
std
::
tr1
::
tuple
<
Size
,
MatType
,
FlagsType
>
Size_MatType_Flag_t
;
typedef
std
::
tr1
::
tuple
<
Size
,
MatType
,
DCT_
FlagsType
>
Size_MatType_Flag_t
;
typedef
perf
::
TestBaseWithParam
<
Size_MatType_Flag_t
>
Size_MatType_Flag
;
PERF_TEST_P
(
Size_MatType_Flag
,
dct
,
testing
::
Combine
(
testing
::
Values
(
cv
::
Size
(
320
,
240
),
cv
::
Size
(
800
,
600
),
cv
::
Size
(
1024
,
768
),
cv
::
Size
(
1280
,
1024
),
sz1080p
,
sz2K
),
testing
::
Values
(
CV_32FC1
,
CV_64FC1
),
FlagsType
::
all
()))
testing
::
Values
(
CV_32FC1
,
CV_64FC1
),
DCT_
FlagsType
::
all
()))
{
Size
sz
=
get
<
0
>
(
GetParam
());
int
type
=
get
<
1
>
(
GetParam
());
...
...
@@ -56,7 +57,7 @@ PERF_TEST_P(Size_MatType_Flag, dct, testing::Combine(
.
out
(
dst
)
.
time
(
60
);
TEST_CYCLE
()
dct
(
src
,
dst
,
flags
);
TEST_CYCLE
()
dct
(
src
,
dst
,
flags
);
SANITY_CHECK
(
dst
,
1e-5
,
ERROR_RELATIVE
);
}
\ No newline at end of file
modules/core/src/dxt.cpp
View file @
507ea952
...
...
@@ -2960,7 +2960,7 @@ template <typename Dct>
bool
DctIPPLoop
(
const
Mat
&
src
,
Mat
&
dst
,
const
Dct
&
ippidct
,
bool
inv
)
{
bool
ok
;
parallel_for_
(
Range
(
0
,
src
.
rows
),
DctIPPLoop_Invoker
<
Dct
>
(
src
,
dst
,
ippidct
,
inv
,
&
ok
),
src
.
total
()
/
(
double
)(
1
<<
16
)
);
parallel_for_
(
Range
(
0
,
src
.
rows
),
DctIPPLoop_Invoker
<
Dct
>
(
src
,
dst
,
ippidct
,
inv
,
&
ok
),
src
.
rows
/
(
double
)(
1
<<
4
)
);
return
ok
;
}
...
...
@@ -2976,11 +2976,8 @@ private:
ippiDCTFunc
func
;
};
static
bool
ippi_DCT
(
const
Mat
&
src
,
Mat
&
dst
,
bool
inv
,
bool
row
)
static
bool
ippi_DCT
_32f
(
const
Mat
&
src
,
Mat
&
dst
,
bool
inv
,
bool
row
)
{
if
(
src
.
type
()
!=
CV_32F
)
return
false
;
ippiDCTFunc
ippFunc
=
inv
?
(
ippiDCTFunc
)
ippiDCTInv_32f_C1R
:
(
ippiDCTFunc
)
ippiDCTFwd_32f_C1R
;
if
(
row
)
...
...
@@ -3066,9 +3063,9 @@ void cv::dct( InputArray _src0, OutputArray _dst, int flags )
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) && !defined HAVE_IPP_ICV_ONLY
bool
row
=
(
flags
&
DCT_ROWS
)
!=
0
;
if
(
!
row
||
src
.
rows
>
(
int
)(
1
<<
8
)
)
if
(
src
.
type
()
==
CV_32F
)
{
if
(
ippi_DCT
(
src
,
dst
,
inv
,
row
))
if
(
ippi_DCT
_32f
(
src
,
dst
,
inv
,
row
))
return
;
setIppErrorStatus
();
}
...
...
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