Index: source/libvpx/test/fdct8x8_test.cc |
diff --git a/source/libvpx/test/fdct8x8_test.cc b/source/libvpx/test/fdct8x8_test.cc |
index 795a60863f74f4f1f0d4e835dd358a2811ee55bc..4c12bb49b315fef1c5512e2ab9dac7d24b329ebd 100644 |
--- a/source/libvpx/test/fdct8x8_test.cc |
+++ b/source/libvpx/test/fdct8x8_test.cc |
@@ -20,11 +20,32 @@ |
#include "./vp9_rtcd.h" |
#include "vp9/common/vp9_entropy.h" |
+#include "vp9/common/vp9_scan.h" |
#include "vpx/vpx_codec.h" |
#include "vpx/vpx_integer.h" |
+#include "vpx_ports/mem.h" |
+ |
+using libvpx_test::ACMRandom; |
+ |
+namespace { |
const int kNumCoeffs = 64; |
const double kPi = 3.141592653589793238462643383279502884; |
+ |
+const int kSignBiasMaxDiff255 = 1500; |
+const int kSignBiasMaxDiff15 = 10000; |
+ |
+typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride); |
+typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride); |
+typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, |
+ int tx_type); |
+typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, |
+ int tx_type); |
+ |
+typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param; |
+typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param; |
+typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param; |
+ |
void reference_8x8_dct_1d(const double in[8], double out[8], int stride) { |
const double kInvSqrt2 = 0.707106781186547524400844362104; |
for (int k = 0; k < 8; k++) { |
@@ -59,23 +80,6 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs], |
} |
} |
-using libvpx_test::ACMRandom; |
- |
-namespace { |
- |
-const int kSignBiasMaxDiff255 = 1500; |
-const int kSignBiasMaxDiff15 = 10000; |
- |
-typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride); |
-typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride); |
-typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, |
- int tx_type); |
-typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, |
- int tx_type); |
- |
-typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param; |
-typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param; |
-typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param; |
void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { |
vp9_fdct8x8_c(in, out, stride); |
@@ -777,4 +781,18 @@ INSTANTIATE_TEST_CASE_P( |
make_tuple(&vp9_fdct8x8_ssse3, &vp9_idct8x8_64_add_ssse3, 0, |
VPX_BITS_8))); |
#endif |
+ |
+#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
+INSTANTIATE_TEST_CASE_P( |
+ MSA, FwdTrans8x8DCT, |
+ ::testing::Values( |
+ make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_msa, 0, VPX_BITS_8))); |
+INSTANTIATE_TEST_CASE_P( |
+ MSA, FwdTrans8x8HT, |
+ ::testing::Values( |
+ make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_msa, 0, VPX_BITS_8), |
+ make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_msa, 1, VPX_BITS_8), |
+ make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_msa, 2, VPX_BITS_8), |
+ make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_msa, 3, VPX_BITS_8))); |
+#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
} // namespace |