From 1092cc7f1a0c08b6a19a8e4cc0cc04dd990e4601 Mon Sep 17 00:00:00 2001 From: Johann Date: Tue, 8 Aug 2017 14:19:56 -0700 Subject: [PATCH] quantize test: use negative input coeff contains signed values. Change-Id: I02f74decf30379a28122169ab3e844d0f3bd7d23 --- test/vp9_quantize_test.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/vp9_quantize_test.cc b/test/vp9_quantize_test.cc index 7ec8f585b..ea4561353 100644 --- a/test/vp9_quantize_test.cc +++ b/test/vp9_quantize_test.cc @@ -151,7 +151,7 @@ TEST_P(VP9QuantizeTest, OperationCheck) { const TX_TYPE tx_type = (TX_TYPE)((i >> 2) % 3); const scan_order *scan_order = &vp9_scan_orders[sz][tx_type]; const int count = (4 << sz) * (4 << sz); // 16, 64, 256 - coeff.Set(&rnd, 0, max_value_); + coeff.Set(&rnd, -max_value_, max_value_); GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_, quant_shift_ptr_, dequant_ptr_); @@ -207,8 +207,10 @@ TEST_P(VP9QuantizeTest, EOBCheck) { int count = (4 << sz) * (4 << sz); // 16, 64, 256 // Two random entries coeff.Set(0); - coeff.TopLeftPixel()[rnd(count)] = rnd.RandRange(max_value_); - coeff.TopLeftPixel()[rnd(count)] = rnd.RandRange(max_value_); + coeff.TopLeftPixel()[rnd(count)] = + rnd.RandRange(max_value_ * 2) - max_value_; + coeff.TopLeftPixel()[rnd(count)] = + rnd.RandRange(max_value_ * 2) - max_value_; GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_, quant_shift_ptr_, dequant_ptr_); -- 2.40.0