[x265] [PATCH 2 of 2] move firstC2Idx, firstC2Flag and c1Next from common to local

Min Chen chenm003 at 163.com
Fri Jun 12 22:51:57 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1434142307 25200
# Node ID 82c07c3941be6d81938c2995b990f0999cd37a6f
# Parent  e235ed1f42d71d12ce089e1cd586778ac45976b2
move firstC2Idx, firstC2Flag and c1Next from common to local
---
 source/encoder/entropy.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r e235ed1f42d7 -r 82c07c3941be source/encoder/entropy.cpp
--- a/source/encoder/entropy.cpp	Fri Jun 12 13:51:44 2015 -0700
+++ b/source/encoder/entropy.cpp	Fri Jun 12 13:51:47 2015 -0700
@@ -1753,14 +1753,11 @@
             memcpy(baseCtxModX0, m_contextState, sizeof(m_contextState));
             memcpy(baseCtxModX1, m_contextState, sizeof(m_contextState));
 
-            uint32_t firstC2Idx = 8;
-            uint32_t firstC2Flag = 2;
-            uint32_t c1Next = 0xFFFFFFFE;
             if (!m_bitIf)
             {
                 uint32_t sum = primitives.costC1C2Flag(absCoeff, numC1Flag, baseCtxMod, (bIsLuma ? 0 : NUM_ABS_FLAG_CTX_LUMA - NUM_ONE_FLAG_CTX_LUMA) + (OFF_ABS_FLAG_CTX - OFF_ONE_FLAG_CTX) - 3 * ctxSet);
+                uint32_t firstC2Idx = (sum >> 28);
                 c1 = ((sum >> 26) & 3);
-                firstC2Idx = (sum >> 28);
                 m_fracBits += sum & 0x00FFFFFF;
 
                 const int hiddenShift = (bHideFirstSign & signHidden) ? 1 : 0;
@@ -1777,6 +1774,10 @@
             // Standard path
             else
             {
+                uint32_t firstC2Idx = 8;
+                uint32_t firstC2Flag = 2;
+                uint32_t c1Next = 0xFFFFFFFE;
+
                 idx = 0;
                 do
                 {



More information about the x265-devel mailing list