[x265] [PATCH 1 of 3] modify logic to remove lastCG in Quant::signBitHidingHDQ()

Min Chen chenm003 at 163.com
Sat May 16 04:29:25 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1431736222 25200
# Node ID 8a72f51e58a850dda1646900cba05ab50f282fd3
# Parent  462ff027b5da131be170cdac6e8a798adae158f1
modify logic to remove lastCG in Quant::signBitHidingHDQ()
---
 source/common/quant.cpp |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff -r 462ff027b5da -r 8a72f51e58a8 source/common/quant.cpp
--- a/source/common/quant.cpp	Fri May 15 17:30:19 2015 -0700
+++ b/source/common/quant.cpp	Fri May 15 17:30:22 2015 -0700
@@ -255,7 +255,6 @@
 {
     uint32_t trSize = 1 << log2TrSize;
     const uint16_t* scan = codeParams.scan;
-    bool lastCG = true;
 
     uint8_t coeffNum[MLS_GRP_NUM];      // value range[0, 16]
     uint16_t coeffSign[MLS_GRP_NUM];    // bit mask map for non-zero coeff sign
@@ -323,7 +322,7 @@
                 int minCostInc = MAX_INT,  minPos = -1, curCost = MAX_INT;
                 int16_t finalChange = 0, curChange = 0;
 
-                for (n = (lastCG ? lastNZPosInCG : SCAN_SET_SIZE - 1); n >= 0; --n)
+                for (n = (cg == cgLastScanPos ? lastNZPosInCG : SCAN_SET_SIZE - 1); n >= 0; --n)
                 {
                     uint32_t blkPos = scan[n + cgStartPos];
                     if (coeff[blkPos])
@@ -387,8 +386,6 @@
                     coeff[minPos] -= finalChange;
             }
         }
-
-        lastCG = false;
     }
 
     return numSig;



More information about the x265-devel mailing list