[x265-commits] [x265] cleanup: remove reduce condition check

Min Chen chenm003 at 163.com
Tue Aug 19 20:15:50 CEST 2014


details:   http://hg.videolan.org/x265/rev/5a174ca360f3
branches:  
changeset: 7837:5a174ca360f3
user:      Min Chen <chenm003 at 163.com>
date:      Tue Aug 19 12:16:08 2014 -0700
description:
cleanup: remove reduce condition check
Subject: [x265] fix single thread encode issue

details:   http://hg.videolan.org/x265/rev/80129b1b6260
branches:  
changeset: 7838:80129b1b6260
user:      Min Chen <chenm003 at 163.com>
date:      Tue Aug 19 12:16:34 2014 -0700
description:
fix single thread encode issue

diffstat:

 source/encoder/entropy.cpp      |   2 +-
 source/encoder/frameencoder.cpp |  10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 63cd8539e7d4 -r 80129b1b6260 source/encoder/entropy.cpp
--- a/source/encoder/entropy.cpp	Tue Aug 19 12:04:41 2014 -0500
+++ b/source/encoder/entropy.cpp	Tue Aug 19 12:16:34 2014 -0700
@@ -612,7 +612,7 @@ void Entropy::finishCU(TComDataCU* cu, u
     {
         // The 1-terminating bit is added to all streams, so don't add it here when it's 1.
         if (!bTerminateSlice)
-            codeTerminatingBit(bTerminateSlice ? 1 : 0);
+            codeTerminatingBit(0);
 
         if (!m_bitIf)
             resetBits();
diff -r 63cd8539e7d4 -r 80129b1b6260 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Tue Aug 19 12:04:41 2014 -0500
+++ b/source/encoder/frameencoder.cpp	Tue Aug 19 12:16:34 2014 -0700
@@ -482,13 +482,19 @@ void FrameEncoder::encodeSlice()
         m_frameStats.coeffBits += cu->m_coeffBits;
         m_frameStats.miscBits += cu->m_totalBits - (cu->m_mvBits + cu->m_coeffBits);
 
-        if (col == widthInLCUs - 1)
+        if (m_param->bEnableWavefront && col == widthInLCUs - 1)
         {
             m_entropyCoder.codeTerminatingBit(1);
             m_entropyCoder.codeSliceFinish();
-            m_outStreams[lin].writeByteAlignment();
+            m_outStreams[subStrm].writeByteAlignment();
         }
     }
+    if (!m_param->bEnableWavefront)
+    {
+        m_entropyCoder.codeTerminatingBit(1);
+        m_entropyCoder.codeSliceFinish();
+        m_outStreams[0].writeByteAlignment();
+    }
 }
 
 void FrameEncoder::compressCTURows()


More information about the x265-commits mailing list