]> granicus.if.org Git - libvpx/commitdiff
quantize test: quiet overflow warning
authorJohann <johannkoenig@google.com>
Tue, 15 Aug 2017 15:28:09 +0000 (08:28 -0700)
committerJohann <johannkoenig@google.com>
Tue, 15 Aug 2017 15:28:09 +0000 (08:28 -0700)
Promote the result of RandRange to signed

Change-Id: I89313cace3bcbe9af96946bef00b6857fc48b128

test/vp9_quantize_test.cc

index 903958959cfe7ff2c23f54edfb4d45ce6e795b92..c1083259094c260cfee99a6c664366d49040e395 100644 (file)
@@ -210,9 +210,9 @@ TEST_P(VP9QuantizeTest, EOBCheck) {
     // Two random entries
     coeff.Set(0);
     coeff.TopLeftPixel()[rnd(count)] =
-        rnd.RandRange(max_value_ * 2) - max_value_;
+        static_cast<int>(rnd.RandRange(max_value_ * 2)) - max_value_;
     coeff.TopLeftPixel()[rnd(count)] =
-        rnd.RandRange(max_value_ * 2) - max_value_;
+        static_cast<int>(rnd.RandRange(max_value_ * 2)) - max_value_;
     GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_,
                          quant_shift_ptr_, dequant_ptr_);