shithub: libvpx

Download patch

ref: e8bd534c42b17e56c8e71dfeaf5cc00dc7f1cf08
parent: 0c30b75f402934e8ef75876be484aa86402e4ba8
parent: af08fbb44467fb4e824ba353d64d0905fd5cc023
author: Johann Koenig <[email protected]>
date: Thu Jul 20 15:46:05 EDT 2017

Merge "quantize test: promote RandRange() result to signed"

--- a/test/vp9_quantize_test.cc
+++ b/test/vp9_quantize_test.cc
@@ -115,7 +115,7 @@
       // round may be up to 685 for Y values or 914 for U/V.
       round_ptr[j] = rnd.RandRange(914);
       // quant ranges from 1 to -32703
-      quant_ptr[j] = rnd.RandRange(32704) - 32703;
+      quant_ptr[j] = static_cast<int>(rnd.RandRange(32704)) - 32703;
       // quant_shift goes up to 1 << 16.
       quant_shift_ptr[j] = rnd.RandRange(16384);
       // dequant maxes out at 1828 for all cases.
@@ -181,7 +181,7 @@
     for (int j = 0; j < 2; j++) {
       zbin_ptr[j] = rnd.RandRange(1200);
       round_ptr[j] = rnd.RandRange(914);
-      quant_ptr[j] = rnd.RandRange(32704) - 32703;
+      quant_ptr[j] = static_cast<int>(rnd.RandRange(32704)) - 32703;
       quant_shift_ptr[j] = rnd.RandRange(16384);
       dequant_ptr[j] = rnd.RandRange(1828);
     }
@@ -248,7 +248,7 @@
     for (int j = 0; j < 2; j++) {
       zbin_ptr[j] = rnd.RandRange(1200);
       round_ptr[j] = rnd.RandRange(914);
-      quant_ptr[j] = rnd.RandRange(32704) - 32703;
+      quant_ptr[j] = static_cast<int>(rnd.RandRange(32704)) - 32703;
       quant_shift_ptr[j] = rnd.RandRange(16384);
       dequant_ptr[j] = rnd.RandRange(1828);
     }
@@ -315,7 +315,7 @@
     for (int j = 0; j < 2; j++) {
       zbin_ptr[j] = rnd.RandRange(1200);
       round_ptr[j] = rnd.RandRange(914);
-      quant_ptr[j] = rnd.RandRange(32704) - 32703;
+      quant_ptr[j] = static_cast<int>(rnd.RandRange(32704)) - 32703;
       quant_shift_ptr[j] = rnd.RandRange(16384);
       dequant_ptr[j] = rnd.RandRange(1828);
     }