shithub: openh264

Download patch

ref: 29dd5e71bec675cab6eed5be68f98abfed7aa0d2
parent: 01016b1c83b019d731e73c0bf513cd79ea3223ff
author: huade <huashi@cisco.com>
date: Tue Nov 24 12:55:30 EST 2015

fixed bug for firsMbIndex in multi-thread-slice encoding with slicemode==SM_SIZELIMITED_SLICE

--- a/codec/encoder/core/src/slice_multi_threading.cpp
+++ b/codec/encoder/core/src/slice_multi_threading.cpp
@@ -821,9 +821,9 @@
         const int32_t kiFirstMbInPartition      = pPrivateData->iStartMbIndex;  // inclusive
         const int32_t kiEndMbInPartition        = pPrivateData->iEndMbIndex;            // exclusive
         int32_t iAnyMbLeftInPartition           = kiEndMbInPartition - kiFirstMbInPartition;
-        SSliceHeaderExt* pStartSliceHeaderExt   = &pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx].sSliceHeaderExt;
 
         iSliceIdx = pPrivateData->iSliceIndex;
+        SSliceHeaderExt* pStartSliceHeaderExt                   = &pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx].sSliceHeaderExt;
         pStartSliceHeaderExt->sSliceHeader.iFirstMbInSlice      = kiFirstMbInPartition;
         pCurDq->pNumSliceCodedOfPartition[kiPartitionId]        =
           1;    // one pSlice per partition intialized, dynamic slicing inside