shithub: libvpx

Download patch

ref: 4060456c038049dfac5c1dba27fd5efa8e36f217
parent: 4b8cb2e66be17eea579b48fccc3d05f8cad40514
parent: 8b9edfc5287595e19f2f3c1acd7e9c60e5c15ca8
author: Johann Koenig <johannkoenig@google.com>
date: Mon Sep 24 18:30:09 EDT 2018

Merge "fix integer overflow caused by uninitialized memory"

--- a/test/avg_test.cc
+++ b/test/avg_test.cc
@@ -263,6 +263,8 @@
     EXPECT_EQ(expected, total);
   }
 
+  tran_low_t *GetCoeff() const { return src_; }
+
   int satd_size_;
 
  private:
@@ -317,6 +319,10 @@
     EXPECT_EQ(expected, total);
   }
 
+  tran_low_t *GetCoeff() const { return coeff_; }
+
+  tran_low_t *GetDQCoeff() const { return dqcoeff_; }
+
   int txfm_size_;
 
  private:
@@ -428,8 +434,9 @@
 TEST_P(SatdTest, DISABLED_Speed) {
   const int kCountSpeedTestBlock = 20000;
   vpx_usec_timer timer;
-  DECLARE_ALIGNED(16, tran_low_t, coeff[1024]);
   const int blocksize = GET_PARAM(0);
+  FillRandom();
+  tran_low_t *coeff = GetCoeff();
 
   vpx_usec_timer_start(&timer);
   for (int i = 0; i < kCountSpeedTestBlock; ++i) {
@@ -472,9 +479,10 @@
 TEST_P(BlockErrorTestFP, DISABLED_Speed) {
   const int kCountSpeedTestBlock = 20000;
   vpx_usec_timer timer;
-  DECLARE_ALIGNED(16, tran_low_t, coeff[1024]);
-  DECLARE_ALIGNED(16, tran_low_t, dqcoeff[1024]);
   const int blocksize = GET_PARAM(0);
+  FillRandom();
+  tran_low_t *coeff = GetCoeff();
+  tran_low_t *dqcoeff = GetDQCoeff();
 
   vpx_usec_timer_start(&timer);
   for (int i = 0; i < kCountSpeedTestBlock; ++i) {