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

Min Chen chenm003 at 163.com
Thu Sep 4 01:37:47 CEST 2014


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1409787404 25200
# Node ID 94bd00d1af5d8c5f6f26f97c50a727588a860714
# Parent  62c4779fb0bb35d5d8a69678e9e8aa81272f0115
testbench(nquant): the Round value must be less than (2 ^ qbits)

diff -r 62c4779fb0bb -r 94bd00d1af5d source/test/mbdstharness.cpp
--- a/source/test/mbdstharness.cpp	Thu Aug 28 13:14:34 2014 +0530
+++ b/source/test/mbdstharness.cpp	Wed Sep 03 16:36:44 2014 -0700
@@ -252,7 +252,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 numCoeff = height * width;
 



More information about the x265-devel mailing list