Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
c4789b85
Commit
c4789b85
authored
Jan 02, 2018
by
Sebastien Alaiwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplification: merge base class 'TransTestBase'
Change-Id: Idf02559fb795cdfdd40b0d7721b4eb01a0c27f2e
parent
dddb9f3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
test/av1_inv_txfm_test.cc
test/av1_inv_txfm_test.cc
+8
-15
No files found.
test/av1_inv_txfm_test.cc
View file @
c4789b85
...
...
@@ -33,11 +33,15 @@ namespace {
typedef
void
(
*
IdctFunc
)(
const
tran_low_t
*
in
,
tran_low_t
*
out
);
class
TransTestBase
{
typedef
std
::
tr1
::
tuple
<
IdctFunc
,
int
,
int
>
IdctParam
;
class
AV1InvTxfm
:
public
::
testing
::
TestWithParam
<
IdctParam
>
{
public:
virtual
~
TransTestBase
()
{}
virtual
void
SetUp
()
{
inv_txfm_
=
GET_PARAM
(
0
);
txfm_size_
=
GET_PARAM
(
1
);
max_error_
=
GET_PARAM
(
2
);
}
protected:
void
RunInvAccuracyCheck
()
{
ACMRandom
rnd
(
ACMRandom
::
DeterministicSeed
());
const
int
count_test_block
=
5000
;
...
...
@@ -63,23 +67,12 @@ class TransTestBase {
}
}
private:
double
max_error_
;
int
txfm_size_
;
IdctFunc
inv_txfm_
;
};
typedef
std
::
tr1
::
tuple
<
IdctFunc
,
int
,
int
>
IdctParam
;
class
AV1InvTxfm
:
public
TransTestBase
,
public
::
testing
::
TestWithParam
<
IdctParam
>
{
public:
virtual
void
SetUp
()
{
inv_txfm_
=
GET_PARAM
(
0
);
txfm_size_
=
GET_PARAM
(
1
);
max_error_
=
GET_PARAM
(
2
);
}
virtual
void
TearDown
()
{}
};
TEST_P
(
AV1InvTxfm
,
RunInvAccuracyCheck
)
{
RunInvAccuracyCheck
();
}
INSTANTIATE_TEST_CASE_P
(
C
,
AV1InvTxfm
,
...
...
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