shithub: libvpx

Download patch

ref: 385599b553e12eea20568da9197ca3cce4782bfc
parent: 174528de1e56538d2f930251b23272fdc012be1c
parent: 834feffe08113a0528d9c919c846459f4975b962
author: Linfeng Zhang <[email protected]>
date: Wed Dec 7 16:05:05 EST 2016

Merge "Update TEST_P(PartialIDctTest, RunQuantCheck)"

--- a/test/partial_idct_test.cc
+++ b/test/partial_idct_test.cc
@@ -178,35 +178,30 @@
   DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
   DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
 
-  for (int i = 0; i < kCountTestBlock; ++i) {
-    InitMem();
-
-    ACMRandom rnd(ACMRandom::DeterministicSeed());
-
-    for (int j = 0; j < kCountTestBlock; ++j) {
-      // Initialize a test block with input range [-mask_, mask_].
-      if (j == 0) {
-        for (int k = 0; k < input_block_size_; ++k) {
-          input_extreme_block[k] = mask_;
-        }
-      } else if (j == 1) {
-        for (int k = 0; k < input_block_size_; ++k) {
-          input_extreme_block[k] = -mask_;
-        }
-      } else {
-        for (int k = 0; k < input_block_size_; ++k) {
-          input_extreme_block[k] = rnd.Rand8() % 2 ? mask_ : -mask_;
-        }
+  InitMem();
+  for (int i = 0; i < kCountTestBlock * kCountTestBlock; ++i) {
+    // Initialize a test block with input range [-mask_, mask_].
+    if (i == 0) {
+      for (int k = 0; k < input_block_size_; ++k) {
+        input_extreme_block[k] = mask_;
       }
+    } else if (i == 1) {
+      for (int k = 0; k < input_block_size_; ++k) {
+        input_extreme_block[k] = -mask_;
+      }
+    } else {
+      for (int k = 0; k < input_block_size_; ++k) {
+        input_extreme_block[k] = rnd_.Rand8() % 2 ? mask_ : -mask_;
+      }
+    }
 
-      ftxfm_(input_extreme_block, output_ref_block, size_);
+    ftxfm_(input_extreme_block, output_ref_block, size_);
 
-      // quantization with maximum allowed step sizes
-      input_block_[0] = (output_ref_block[0] / 1336) * 1336;
-      for (int k = 1; k < last_nonzero_; ++k) {
-        input_block_[vp9_default_scan_orders[tx_size_].scan[k]] =
-            (output_ref_block[k] / 1828) * 1828;
-      }
+    // quantization with minimum allowed step sizes
+    input_block_[0] = (output_ref_block[0] / 4) * 4;
+    for (int k = 1; k < last_nonzero_; ++k) {
+      const int pos = vp9_default_scan_orders[tx_size_].scan[k];
+      input_block_[pos] = (output_ref_block[pos] / 4) * 4;
     }
 
     ASM_REGISTER_STATE_CHECK(Exec(full_itxfm_, output_block_ref_));