Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
7256eb5c
Commit
7256eb5c
authored
Jul 10, 2017
by
Sebastien Alaiwan
Browse files
idct tests: simplify function pointer
Change-Id: I114a963838295fcbf1ea7687cf6e5431976ee942
parent
fef2fa72
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/av1_inv_txfm_test.cc
View file @
7256eb5c
...
...
@@ -43,7 +43,6 @@ void reference_idct_1d(const double *in, double *out, int size) {
}
}
typedef
void
(
*
IdctFuncRef
)(
const
double
*
in
,
double
*
out
,
int
size
);
typedef
void
(
*
IdctFunc
)(
const
tran_low_t
*
in
,
tran_low_t
*
out
);
class
TransTestBase
{
...
...
@@ -66,7 +65,7 @@ class TransTestBase {
}
fwd_txfm_
(
input
,
output
);
fwd_txfm_ref_
(
ref_input
,
ref_output
,
txfm_size_
);
reference_idct_1d
(
ref_input
,
ref_output
,
txfm_size_
);
for
(
int
ni
=
0
;
ni
<
txfm_size_
;
++
ni
)
{
EXPECT_LE
(
...
...
@@ -79,30 +78,27 @@ class TransTestBase {
double
max_error_
;
int
txfm_size_
;
IdctFunc
fwd_txfm_
;
IdctFuncRef
fwd_txfm_ref_
;
};
typedef
std
::
tr1
::
tuple
<
IdctFunc
,
IdctFuncRef
,
int
,
int
>
IdctParam
;
typedef
std
::
tr1
::
tuple
<
IdctFunc
,
int
,
int
>
IdctParam
;
class
AV1InvTxfm
:
public
TransTestBase
,
public
::
testing
::
TestWithParam
<
IdctParam
>
{
public:
virtual
void
SetUp
()
{
fwd_txfm_
=
GET_PARAM
(
0
);
fwd_txfm_ref_
=
GET_PARAM
(
1
);
txfm_size_
=
GET_PARAM
(
2
);
max_error_
=
GET_PARAM
(
3
);
txfm_size_
=
GET_PARAM
(
1
);
max_error_
=
GET_PARAM
(
2
);
}
virtual
void
TearDown
()
{}
};
TEST_P
(
AV1InvTxfm
,
RunInvAccuracyCheck
)
{
RunInvAccuracyCheck
();
}
INSTANTIATE_TEST_CASE_P
(
C
,
AV1InvTxfm
,
::
testing
::
Values
(
IdctParam
(
&
aom_idct4_c
,
&
reference_idct_1d
,
4
,
1
),
IdctParam
(
&
aom_idct8_c
,
&
reference_idct_1d
,
8
,
2
),
IdctParam
(
&
aom_idct16_c
,
&
reference_idct_1d
,
16
,
4
),
IdctParam
(
&
aom_idct32_c
,
&
reference_idct_1d
,
32
,
6
)));
INSTANTIATE_TEST_CASE_P
(
C
,
AV1InvTxfm
,
::
testing
::
Values
(
IdctParam
(
&
aom_idct4_c
,
4
,
1
),
IdctParam
(
&
aom_idct8_c
,
8
,
2
),
IdctParam
(
&
aom_idct16_c
,
16
,
4
),
IdctParam
(
&
aom_idct32_c
,
32
,
6
)));
#if CONFIG_AV1_ENCODER
typedef
void
(
*
FwdTxfmFunc
)(
const
int16_t
*
in
,
tran_low_t
*
out
,
int
stride
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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