[x265] [PATCH] improvement xGetRateLast by remove reduce double operator

Min Chen chenm003 at 163.com
Thu Oct 24 14:20:55 CEST 2013


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1382617236 -28800
# Node ID 80ae8426d66c2402ca5ffd21429d54c7b13ee322
# Parent  31485d1c19051ac633bda3298f8b9c2dc762d928
improvement xGetRateLast by remove reduce double operator

diff -r 31485d1c1905 -r 80ae8426d66c source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp	Thu Oct 24 20:11:10 2013 +0800
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp	Thu Oct 24 20:20:36 2013 +0800
@@ -1334,7 +1334,7 @@
 {
     UInt ctxX = g_groupIdx[posx];
     UInt ctxY = g_groupIdx[posy];
-    double cost = m_estBitsSbac->lastXBits[ctxX] + m_estBitsSbac->lastYBits[ctxY];
+    UInt cost = m_estBitsSbac->lastXBits[ctxX] + m_estBitsSbac->lastYBits[ctxY];
 
     if (ctxX > 3)
     {
diff -r 31485d1c1905 -r 80ae8426d66c source/Lib/TLibCommon/TComTrQuant.h
--- a/source/Lib/TLibCommon/TComTrQuant.h	Thu Oct 24 20:11:10 2013 +0800
+++ b/source/Lib/TLibCommon/TComTrQuant.h	Thu Oct 24 20:20:36 2013 +0800
@@ -215,7 +215,7 @@
 
     inline double xGetICost(double rage) const { return m_lambda * rage; } ///< Get the cost for a specific rate
 
-    inline double xGetIEPRate() const          { return 32768; }            ///< Get the cost of an equal probable bit
+    inline UInt xGetIEPRate() const          { return 32768; }            ///< Get the cost of an equal probable bit
 
     void xITransformSkip(int* coeff, short* residual, UInt stride, int width, int height);
 };



More information about the x265-devel mailing list