[x265] [PATCH 2 of 4] testbench(quant): the qBits value must be more than or equal to 8
Min Chen
chenm003 at 163.com
Tue Sep 9 04:39:43 CEST 2014
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1410230336 25200
# Node ID 0f1f42504d2d9fdfdf062033252958bd60d682b4
# Parent b00181813b3c2cdd4b13bacfd9600a4626b90baf
testbench(quant): the qBits value must be more than or equal to 8
diff -r b00181813b3c -r 0f1f42504d2d source/common/dct.cpp
--- a/source/common/dct.cpp Mon Sep 08 19:38:41 2014 -0700
+++ b/source/common/dct.cpp Mon Sep 08 19:38:56 2014 -0700
@@ -772,6 +772,7 @@
uint32_t quant_c(int32_t* coef, int32_t* quantCoeff, int32_t* deltaU, int16_t* qCoef, int qBits, int add, int numCoeff)
{
+ X265_CHECK(qBits >= 8, "qBits less than 8\n");
int qBits8 = qBits - 8;
uint32_t numSig = 0;
diff -r b00181813b3c -r 0f1f42504d2d source/test/mbdstharness.cpp
--- a/source/test/mbdstharness.cpp Mon Sep 08 19:38:41 2014 -0700
+++ b/source/test/mbdstharness.cpp Mon Sep 08 19:38:56 2014 -0700
@@ -211,7 +211,7 @@
uint32_t optReturnValue = 0;
uint32_t refReturnValue = 0;
- int bits = rand() % 32;
+ int bits = (rand() % 24) + 8;
int valueToAdd = rand() % (1 << bits);
int cmp_size = sizeof(int) * height * width;
int cmp_size1 = sizeof(short) * height * width;
More information about the x265-devel
mailing list