[x265] [PATCH] fix build error, add definition for getICRateNegDiff

santhoshini at multicorewareinc.com santhoshini at multicorewareinc.com
Thu Feb 5 07:19:51 CET 2015


# HG changeset patch
# User Santhoshini Sekar<santhoshini at multicorewareinc.com>
# Date 1423117093 -19800
#      Thu Feb 05 11:48:13 2015 +0530
# Node ID bd4febc33ccc0a51228bc4884c7a5287fea8fea8
# Parent  0e3ce940f2f416ba7252d98bea79fb9b8875b559
fix build error, add definition for getICRateNegDiff

diff -r 0e3ce940f2f4 -r bd4febc33ccc source/common/quant.cpp
--- a/source/common/quant.cpp	Wed Feb 04 18:54:10 2015 -0600
+++ b/source/common/quant.cpp	Thu Feb 05 11:48:13 2015 +0530
@@ -104,6 +104,20 @@
     return rate;
 }
 
+inline int getICRateNegDiff(uint32_t absLevel, const int* greaterOneBits, const int* levelAbsBits)
+{
+    X265_CHECK(absLevel <= 2, "absLevel check failure\n");
+
+    int rate;
+    if (absLevel == 0)
+        rate = 0;
+    else if (absLevel == 2)
+        rate = greaterOneBits[1] + levelAbsBits[0];
+    else
+        rate = greaterOneBits[0];
+    return rate;
+}
+
 inline int getICRateLessVlc(uint32_t absLevel, int32_t diffLevel, const uint32_t absGoRice)
 {
     X265_CHECK(absGoRice <= 4, "absGoRice check failure\n");


More information about the x265-devel mailing list