[x265] [PATCH 5 of 5] rdoQuant: move cgRdStats.sigCost0 outside from loop

Min Chen chenm003 at 163.com
Fri Apr 17 15:32:21 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1429277490 -28800
# Node ID 9b53deb84953af4e679b0cdc2c6579d1aa28a62a
# Parent  70e81203b675b6b2be781f89a9aabe04def569e2
rdoQuant: move cgRdStats.sigCost0 outside from loop
---
 source/common/quant.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 70e81203b675 -r 9b53deb84953 source/common/quant.cpp
--- a/source/common/quant.cpp	Fri Apr 17 21:31:26 2015 +0800
+++ b/source/common/quant.cpp	Fri Apr 17 21:31:30 2015 +0800
@@ -936,10 +936,11 @@
             }
 
             cgRdStats.sigCost += costSig[scanPos];
-            if (!scanPosinCG)
-                cgRdStats.sigCost0 = costSig[scanPos];
         } /* end for (scanPosinCG) */
 
+        X265_CHECK((cgScanPos << MLS_CG_SIZE) == scanPos, "scanPos mistake\n");
+        cgRdStats.sigCost0 = costSig[scanPos];
+
         costCoeffGroupSig[cgScanPos] = 0;
 
         /* nothing to do at this case */



More information about the x265-devel mailing list