ref: ff184e482a616af575f060238de48e588e4bda7e
parent: 45b39750d6a5c68cba5c03f0780e37c6d57b8c63
parent: 357adb68b21c825475e8f8142d66797bd8a8c5b4
author: Johann Koenig <johannkoenig@google.com>
date: Mon Aug 14 16:52:52 EDT 2017
Merge changes I4b4beab1,I02f74dec * changes: quantize test: check skip_block quantize test: use negative input
--- a/test/vp9_quantize_test.cc
+++ b/test/vp9_quantize_test.cc
@@ -141,7 +141,9 @@
uint16_t eob, ref_eob;
for (int i = 0; i < number_of_iterations; ++i) {
- const int skip_block = i == 0;
+ // Test skip block for the first three iterations to catch all the different
+ // sizes.
+ const int skip_block = i < 3;
TX_SIZE sz;
if (max_size_ == 16) {
sz = (TX_SIZE)(i % 3); // TX_4X4, TX_8X8 TX_16X16
@@ -151,7 +153,7 @@
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_);
@@ -195,7 +197,7 @@
uint16_t eob, ref_eob;
for (int i = 0; i < number_of_iterations; ++i) {
- int skip_block = i == 0;
+ int skip_block = i < 3;
TX_SIZE sz;
if (max_size_ == 16) {
sz = (TX_SIZE)(i % 3); // TX_4X4, TX_8X8 TX_16X16
@@ -207,8 +209,10 @@
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_);