[x265] [PATCH 1 of 4] testbench(quant): the Round value must be less than (2 ^ qbits)

Min Chen chenm003 at 163.com
Tue Sep 9 04:39:42 CEST 2014


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1410230321 25200
# Node ID b00181813b3c2cdd4b13bacfd9600a4626b90baf
# Parent  033299d2bd00921ffaa403bb404d44694845b2d0
testbench(quant): the Round value must be less than (2 ^ qbits)

diff -r 033299d2bd00 -r b00181813b3c source/test/mbdstharness.cpp
--- a/source/test/mbdstharness.cpp	Mon Sep 08 20:48:40 2014 +0200
+++ b/source/test/mbdstharness.cpp	Mon Sep 08 19:38:41 2014 -0700
@@ -212,7 +212,7 @@
         uint32_t refReturnValue = 0;
 
         int bits = rand() % 32;
-        int valueToAdd = rand() % (32 * 1024);
+        int valueToAdd = rand() % (1 << bits);
         int cmp_size = sizeof(int) * height * width;
         int cmp_size1 = sizeof(short) * height * width;
         int numCoeff = height * width;



More information about the x265-devel mailing list