Skip to content
GitLab
Menu
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
51490e56
Commit
51490e56
authored
Nov 18, 2013
by
Joshua Litt
Browse files
Removing PARAMS macro for consistency
Change-Id: I23ed873a6c47b15491a2ffbcdd4f0fdeef1207a0
parent
040dc8c9
Changes
7
Hide whitespace changes
Inline
Side-by-side
test/convolve_test.cc
View file @
51490e56
...
...
@@ -44,6 +44,8 @@ struct ConvolveFunctions {
convolve_fn_t
hv8_avg_
;
};
typedef
std
::
tr1
::
tuple
<
int
,
int
,
const
ConvolveFunctions
*>
convolve_param_t
;
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
#define VP9_FILTER_WEIGHT 128
#define VP9_FILTER_SHIFT 7
...
...
@@ -169,7 +171,7 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr,
output_width
,
output_height
);
}
class
ConvolveTest
:
public
PARAMS
(
int
,
int
,
const
ConvolveFunctions
*
)
{
class
ConvolveTest
:
public
::
testing
::
TestWithParam
<
convolve_param_t
>
{
public:
static
void
SetUpTestCase
()
{
// Force input_ to be unaligned, output to be 16 byte aligned.
...
...
test/dct16x16_test.cc
View file @
51490e56
...
...
@@ -264,6 +264,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
typedef
void
(
*
iht_t
)
(
const
int16_t
*
in
,
uint8_t
*
out
,
int
stride
,
int
tx_type
);
typedef
std
::
tr1
::
tuple
<
fdct_t
,
idct_t
,
int
>
dct_16x16_param_t
;
typedef
std
::
tr1
::
tuple
<
fht_t
,
iht_t
,
int
>
ht_16x16_param_t
;
void
fdct16x16_ref
(
const
int16_t
*
in
,
int16_t
*
out
,
int
stride
,
int
tx_type
)
{
vp9_fdct16x16_c
(
in
,
out
,
stride
);
}
...
...
@@ -412,8 +415,9 @@ class Trans16x16TestBase {
fht_t
fwd_txfm_ref
;
};
class
Trans16x16DCT
:
public
Trans16x16TestBase
,
public
PARAMS
(
fdct_t
,
idct_t
,
int
)
{
class
Trans16x16DCT
:
public
Trans16x16TestBase
,
public
::
testing
::
TestWithParam
<
dct_16x16_param_t
>
{
public:
virtual
~
Trans16x16DCT
()
{}
...
...
@@ -454,8 +458,9 @@ TEST_P(Trans16x16DCT, InvAccuracyCheck) {
RunInvAccuracyCheck
();
}
class
Trans16x16HT
:
public
Trans16x16TestBase
,
public
PARAMS
(
fht_t
,
iht_t
,
int
)
{
class
Trans16x16HT
:
public
Trans16x16TestBase
,
public
::
testing
::
TestWithParam
<
ht_16x16_param_t
>
{
public:
virtual
~
Trans16x16HT
()
{}
...
...
test/dct32x32_test.cc
View file @
51490e56
...
...
@@ -77,7 +77,9 @@ void reference_32x32_dct_2d(const int16_t input[kNumCoeffs],
typedef
void
(
*
fwd_txfm_t
)(
const
int16_t
*
in
,
int16_t
*
out
,
int
stride
);
typedef
void
(
*
inv_txfm_t
)(
const
int16_t
*
in
,
uint8_t
*
out
,
int
stride
);
class
Trans32x32Test
:
public
PARAMS
(
fwd_txfm_t
,
inv_txfm_t
,
int
)
{
typedef
std
::
tr1
::
tuple
<
fwd_txfm_t
,
inv_txfm_t
,
int
>
trans_32x32_param_t
;
class
Trans32x32Test
:
public
::
testing
::
TestWithParam
<
trans_32x32_param_t
>
{
public:
virtual
~
Trans32x32Test
()
{}
virtual
void
SetUp
()
{
...
...
test/fdct4x4_test.cc
View file @
51490e56
...
...
@@ -36,6 +36,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
typedef
void
(
*
iht_t
)
(
const
int16_t
*
in
,
uint8_t
*
out
,
int
stride
,
int
tx_type
);
typedef
std
::
tr1
::
tuple
<
fdct_t
,
idct_t
,
int
>
dct_4x4_param_t
;
typedef
std
::
tr1
::
tuple
<
fht_t
,
iht_t
,
int
>
ht_4x4_param_t
;
void
fdct4x4_ref
(
const
int16_t
*
in
,
int16_t
*
out
,
int
stride
,
int
tx_type
)
{
vp9_fdct4x4_c
(
in
,
out
,
stride
);
}
...
...
@@ -183,7 +186,7 @@ class Trans4x4TestBase {
class
Trans4x4DCT
:
public
Trans4x4TestBase
,
public
PARAMS
(
fdct_t
,
idct_t
,
int
)
{
public
::
testing
::
TestWithParam
<
dct_4x4_param_t
>
{
public:
virtual
~
Trans4x4DCT
()
{}
...
...
@@ -226,7 +229,7 @@ TEST_P(Trans4x4DCT, InvAccuracyCheck) {
class
Trans4x4HT
:
public
Trans4x4TestBase
,
public
PARAMS
(
fht_t
,
iht_t
,
int
)
{
public
::
testing
::
TestWithParam
<
ht_4x4_param_t
>
{
public:
virtual
~
Trans4x4HT
()
{}
...
...
test/fdct8x8_test.cc
View file @
51490e56
...
...
@@ -35,6 +35,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
typedef
void
(
*
iht_t
)
(
const
int16_t
*
in
,
uint8_t
*
out
,
int
stride
,
int
tx_type
);
typedef
std
::
tr1
::
tuple
<
fdct_t
,
idct_t
,
int
>
dct_8x8_param_t
;
typedef
std
::
tr1
::
tuple
<
fht_t
,
iht_t
,
int
>
ht_8x8_param_t
;
void
fdct8x8_ref
(
const
int16_t
*
in
,
int16_t
*
out
,
int
stride
,
int
tx_type
)
{
vp9_fdct8x8_c
(
in
,
out
,
stride
);
}
...
...
@@ -215,8 +218,9 @@ class FwdTrans8x8TestBase {
fht_t
fwd_txfm_ref
;
};
class
FwdTrans8x8DCT
:
public
FwdTrans8x8TestBase
,
public
PARAMS
(
fdct_t
,
idct_t
,
int
)
{
class
FwdTrans8x8DCT
:
public
FwdTrans8x8TestBase
,
public
::
testing
::
TestWithParam
<
dct_8x8_param_t
>
{
public:
virtual
~
FwdTrans8x8DCT
()
{}
...
...
@@ -254,8 +258,9 @@ TEST_P(FwdTrans8x8DCT, ExtremalCheck) {
RunExtremalCheck
();
}
class
FwdTrans8x8HT
:
public
FwdTrans8x8TestBase
,
public
PARAMS
(
fht_t
,
iht_t
,
int
)
{
class
FwdTrans8x8HT
:
public
FwdTrans8x8TestBase
,
public
::
testing
::
TestWithParam
<
ht_8x8_param_t
>
{
public:
virtual
~
FwdTrans8x8HT
()
{}
...
...
test/sixtap_predict_test.cc
View file @
51490e56
...
...
@@ -32,7 +32,10 @@ typedef void (*sixtap_predict_fn_t)(uint8_t *src_ptr,
uint8_t
*
dst_ptr
,
int
dst_pitch
);
class
SixtapPredictTest
:
public
PARAMS
(
int
,
int
,
sixtap_predict_fn_t
)
{
typedef
std
::
tr1
::
tuple
<
int
,
int
,
sixtap_predict_fn_t
>
sixtap_predict_param_t
;
class
SixtapPredictTest
:
public
::
testing
::
TestWithParam
<
sixtap_predict_param_t
>
{
public:
static
void
SetUpTestCase
()
{
src_
=
reinterpret_cast
<
uint8_t
*>
(
vpx_memalign
(
kDataAlignment
,
kSrcSize
));
...
...
test/util.h
View file @
51490e56
...
...
@@ -17,7 +17,6 @@
#include "vpx/vpx_image.h"
// Macros
#define PARAMS(...) ::testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
static
double
compute_psnr
(
const
vpx_image_t
*
img1
,
...
...
Write
Preview
Supports
Markdown
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