Commit 4017fca3 authored by Thomas's avatar Thomas Committed by Yaowu Xu

Modify tests to allow quantization matrices.

Change-Id: If740ec7e549d8bcd387f92c43fd8105c528e86ed
parent 1c122c24
......@@ -17,6 +17,9 @@
namespace {
const int kMaxPSNR = 100;
#if CONFIG_AOM_QM
const int kMaxPSNR_QM = 35;
#endif
class CpuSpeedTest
: public ::libvpx_test::EncoderTest,
......@@ -80,7 +83,11 @@ TEST_P(CpuSpeedTest, TestQ0) {
init_flags_ = VPX_CODEC_USE_PSNR;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
#if CONFIG_AOM_QM
EXPECT_GE(min_psnr_, kMaxPSNR_QM);
#else
EXPECT_GE(min_psnr_, kMaxPSNR);
#endif
}
TEST_P(CpuSpeedTest, TestScreencastQ0) {
......@@ -95,7 +102,11 @@ TEST_P(CpuSpeedTest, TestScreencastQ0) {
init_flags_ = VPX_CODEC_USE_PSNR;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
#if CONFIG_AOM_QM
EXPECT_GE(min_psnr_, kMaxPSNR_QM);
#else
EXPECT_GE(min_psnr_, kMaxPSNR);
#endif
}
TEST_P(CpuSpeedTest, TestEncodeHighBitrate) {
......
......@@ -132,7 +132,11 @@ class EndToEndTestLarge
}
double GetPsnrThreshold() {
#if CONFIG_AOM_QM
return kPsnrThreshold[cpu_used_][encoding_mode_] - 3.0;
#else
return kPsnrThreshold[cpu_used_][encoding_mode_];
#endif
}
TestVideoParam test_video_param_;
......
......@@ -28,6 +28,7 @@
using libvpx_test::ACMRandom;
namespace {
#if !CONFIG_AOM_QM
#if CONFIG_VPX_HIGHBITDEPTH
const int number_of_iterations = 100;
......@@ -341,4 +342,5 @@ INSTANTIATE_TEST_CASE_P(
&vpx_highbd_quantize_b_32x32_c, VPX_BITS_12)));
#endif // HAVE_SSE2
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_AOM_QM
} // namespace
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment