]> granicus.if.org Git - libvpx/commitdiff
quantize test: set threshold for 32x32
authorJohann <johannkoenig@google.com>
Wed, 23 Aug 2017 22:59:11 +0000 (15:59 -0700)
committerJohann <johannkoenig@google.com>
Wed, 23 Aug 2017 22:59:11 +0000 (15:59 -0700)
Change-Id: I77be617c7d7c64929dd51c6077322f4f8ad23897

test/vp9_quantize_test.cc

index fcf86e9c6742005ac72886097bb17ed08bef0787..a6ad941bd0bffc2bb0cd681a5798af5026af6814 100644 (file)
@@ -299,7 +299,13 @@ TEST_P(VP9QuantizeTest, DISABLED_Speed) {
 
       if (i == 0) {
         // When |coeff values| are less than zbin the results are 0.
-        for (int j = 0; j < 8; ++j) zbin_ptr_[j] = 100;
+        int threshold = 100;
+        if (max_size_ == 32) {
+          // For 32x32, the threshold is halved. Double it to keep the values
+          // from clearing it.
+          threshold = 200;
+        }
+        for (int j = 0; j < 8; ++j) zbin_ptr_[j] = threshold;
         coeff.Set(&rnd, -99, 99);
       } else if (i == 1) {
         for (int j = 0; j < 8; ++j) zbin_ptr_[j] = 50;