[x265] [PATCH 2 of 2] fix single thread encode issue

Min Chen chenm003 at 163.com
Tue Aug 19 21:16:46 CEST 2014


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1408475794 25200
# Node ID 5443cc80d6d692a41b98d49f348612d4daccb333
# Parent  097a8749922f37c8bfaa55fc0e2cb21943d30b34
fix single thread encode issue

diff -r 097a8749922f -r 5443cc80d6d6 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Tue Aug 19 12:16:08 2014 -0700
+++ b/source/encoder/frameencoder.cpp	Tue Aug 19 12:16:34 2014 -0700
@@ -481,13 +481,19 @@
         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-devel mailing list