[x265] [PATCH] xDeQuant renamed to dequant and code cleanup

praveen at multicorewareinc.com praveen at multicorewareinc.com
Mon Jul 8 12:50:35 CEST 2013


# HG changeset patch
# User praveentiwari
# Date 1373280622 -19800
# Node ID fad2ee52b66b82c78edde5b767546e0ffc9aa721
# Parent  f8af33ff32886e34b9073237c59bcf2c08c4eeea
xDeQuant renamed to dequant and code cleanup

diff -r f8af33ff3288 -r fad2ee52b66b source/common/dct.cpp
--- a/source/common/dct.cpp	Mon Jul 08 15:01:51 2013 +0530
+++ b/source/common/dct.cpp	Mon Jul 08 16:20:22 2013 +0530
@@ -701,11 +701,8 @@
     }
 }
 
-void xDeQuant(int bitDepth, const int* src, int* dst, int width, int height, int per, int rem, bool useScalingList, unsigned int log2TrSize, int *dequantCoefOrig)
+void dequant(int bitDepth, const int* quantCoef, int* coef, int width, int height, int per, int rem, bool useScalingList, unsigned int log2TrSize, int *dequantCoef)
 {
-    const int* qCoef = src;
-    int* coef = dst;
-
     int invQuantScales[6] = { 40, 45, 51, 57, 64, 72 };
 
     if (width > 32)
@@ -725,7 +722,6 @@
     if (useScalingList)
     {
         shift += 4;
-        int *dequantCoef = dequantCoefOrig;
 
         if (shift > per)
         {
@@ -733,7 +729,7 @@
 
             for (int n = 0; n < width * height; n++)
             {
-                clipQCoef = Clip3(-32768, 32767, qCoef[n]);
+                clipQCoef = Clip3(-32768, 32767, quantCoef[n]);
                 coeffQ = ((clipQCoef * dequantCoef[n]) + add) >> (shift - per);
                 coef[n] = Clip3(-32768, 32767, coeffQ);
             }
@@ -742,7 +738,7 @@
         {
             for (int n = 0; n < width * height; n++)
             {
-                clipQCoef = Clip3(-32768, 32767, qCoef[n]);
+                clipQCoef = Clip3(-32768, 32767, quantCoef[n]);
                 coeffQ   = Clip3(-32768, 32767, clipQCoef * dequantCoef[n]);
                 coef[n] = Clip3(-32768, 32767, coeffQ << (per - shift));
             }
@@ -755,7 +751,7 @@
 
         for (int n = 0; n < width * height; n++)
         {
-            clipQCoef = Clip3(-32768, 32767, qCoef[n]);
+            clipQCoef = Clip3(-32768, 32767, quantCoef[n]);
             coeffQ = (clipQCoef * scale + add) >> shift;
             coef[n] = Clip3(-32768, 32767, coeffQ);
         }
@@ -830,7 +826,7 @@
 
 void Setup_C_DCTPrimitives(EncoderPrimitives& p)
 {
-    p.deQuant = xDeQuant;
+    p.deQuant = dequant;
     p.quantaq = quantaq_C;
     p.quant = quant_C;
     p.dct[DST_4x4] = dst4_c;


More information about the x265-devel mailing list