[x265] [PATCH 5 of 6] quant: do not check CG bitmap for implied-present coeff groups

Steve Borho steve at borho.org
Sat Aug 9 10:23:43 CEST 2014


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1407560918 18000
#      Sat Aug 09 00:08:38 2014 -0500
# Node ID 220e217152cfafe10f6969943438b719a6f4c216
# Parent  95b1d7535af8f6ac3e456fef9807522a89d5e416
quant: do not check CG bitmap for implied-present coeff groups

diff -r 95b1d7535af8 -r 220e217152cf source/common/quant.cpp
--- a/source/common/quant.cpp	Sat Aug 09 00:01:46 2014 -0500
+++ b/source/common/quant.cpp	Sat Aug 09 00:08:38 2014 -0500
@@ -825,7 +825,8 @@
         uint32_t cgBlkPos = codeParams.scanCG[cgScanPos];
         totalRdCost -= costCoeffGroupSig[cgScanPos];
 
-        if (!(sigCoeffGroupFlag64 & ((uint64_t)1 << cgBlkPos))) /* skip empty CGs */
+        if (cgScanPos && cgScanPos != cgLastScanPos && 
+            !(sigCoeffGroupFlag64 & ((uint64_t)1 << cgBlkPos))) /* skip empty CGs */
             continue;
 
         for (int scanPosinCG = cgSize - 1; scanPosinCG >= 0; scanPosinCG--)


More information about the x265-devel mailing list