[x265] [PATCH] Replaced uint64_t with int in quantaq_C and quant_C functions, tested with BasketballDrive

praveen at multicorewareinc.com praveen at multicorewareinc.com
Fri Jun 28 12:14:34 CEST 2013


# HG changeset patch
# User praveentiwari
# Date 1372414462 -19800
# Node ID 9735d90586e06fd961f56db25c8dd476010af9df
# Parent  10a9bc9979664320467f998712d3722ca9c50184
Replaced uint64_t with int in quantaq_C and quant_C functions, tested with BasketballDrive.

diff -r 10a9bc997966 -r 9735d90586e0 source/common/dct.cpp
--- a/source/common/dct.cpp	Fri Jun 28 00:03:21 2013 -0500
+++ b/source/common/dct.cpp	Fri Jun 28 15:44:22 2013 +0530
@@ -783,10 +783,10 @@
         level = coef[blockpos];
         sign  = (level < 0 ? -1 : 1);
 
-        uint64_t tmplevel = (uint64_t)abs(level) * quantCoeff[blockpos];
-        arlCCoef[blockpos] = (int)((tmplevel + addc) >> qBitsC);
-        level = (int)((tmplevel + add) >> qBits);
-        deltaU[blockpos] = (int)((tmplevel - (level << qBits)) >> qBits8);
+        int tmplevel = abs(level) * quantCoeff[blockpos];
+        arlCCoef[blockpos] = ((tmplevel + addc) >> qBitsC);
+        level = ((tmplevel + add) >> qBits);
+        deltaU[blockpos] = ((tmplevel - (level << qBits)) >> qBits8);
         acSum += level;
         level *= sign;
         qCoef[blockpos] = Clip3(-32768, 32767, level);
@@ -813,9 +813,9 @@
         level = coef[blockpos];
         sign  = (level < 0 ? -1 : 1);
 
-        uint64_t tmplevel = (uint64_t)abs(level) * quantCoeff[blockpos];
-        level = (int)((tmplevel + add) >> qBits);
-        deltaU[blockpos] = (int)((tmplevel - (level << qBits)) >> qBits8);
+        int tmplevel = abs(level) * quantCoeff[blockpos];
+        level = ((tmplevel + add) >> qBits);
+        deltaU[blockpos] = ((tmplevel - (level << qBits)) >> qBits8);
         acSum += level;
         level *= sign;
         qCoef[blockpos] = Clip3(-32768, 32767, level);


More information about the x265-devel mailing list