shithub: openh264

Download patch

ref: e219865113c30fb0cc9054ab27c699823cd57d9d
parent: 75a0766237e9b25b3715ca24ae05bb06c3880056
author: Huade Shi (huashi) <huashi@cisco.com>
date: Wed Mar 29 07:44:33 EDT 2017

slice buffer variable rename:pSlice->uiThreadIdx replaced by pSlice->uiBufferIdx

--- a/codec/encoder/core/inc/slice.h
+++ b/codec/encoder/core/inc/slice.h
@@ -185,7 +185,7 @@
 uint8_t         sScaleShift;
 
 int32_t         iSliceIdx;
-uint32_t        uiThreadIdx;
+uint32_t        uiBufferIdx;
 bool            bSliceHeaderExtFlag; // Indicate which slice header is used, avc or ext?
 uint8_t         uiLastMbQp;             // stored qp for last mb coded, maybe more efficient for mb skip detection etc.
 
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -948,7 +948,7 @@
     }
 
     pSlice->iSliceIdx          = iSliceIdx;
-    pSlice->uiThreadIdx        = 0;
+    pSlice->uiBufferIdx        = 0;
     pSlice->iCountMbNumInSlice = 0;
     pSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice = 0;
 
@@ -1005,7 +1005,7 @@
       pSlice = &pCtx->pCurDqLayer->sSliceBufferInfo [0].pSliceBuffer[kiSliceIdx];
   }
   pSlice->iSliceIdx   = kiSliceIdx;
-  pSlice->uiThreadIdx = kiSlcBuffIdx;
+  pSlice->uiBufferIdx = kiSlcBuffIdx;
 
   // Initialize slice bs buffer info
   pSlice->sSliceBs.uiBsPos   = 0;
@@ -1235,7 +1235,7 @@
     }
 
     pSlice->iSliceIdx = -1;
-    pSlice->uiThreadIdx = 0;
+    pSlice->uiBufferIdx = 0;
     pSlice->iCountMbNumInSlice = 0;
     pSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice = 0;
 
@@ -1678,8 +1678,8 @@
 void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSliceCtx, SMB* pCurMb,
                        int32_t iFirstMbIdxOfNextSlice, const int32_t kiLastMbIdxInPartition) {
   SDqLayer*     pCurLayer       = pEncCtx->pCurDqLayer;
-  SSlice*       pSliceBuffer    = pCurLayer->sSliceBufferInfo[pCurSlice->uiThreadIdx].pSliceBuffer;
-  int32_t       iCodedSliceNum  = pCurLayer->sSliceBufferInfo[pCurSlice->uiThreadIdx].iCodedSliceNum;
+  SSlice*       pSliceBuffer    = pCurLayer->sSliceBufferInfo[pCurSlice->uiBufferIdx].pSliceBuffer;
+  int32_t       iCodedSliceNum  = pCurLayer->sSliceBufferInfo[pCurSlice->uiBufferIdx].iCodedSliceNum;
   int32_t       iCurMbIdx       = pCurMb->iMbXY;
   uint16_t      iCurSliceIdc    = pSliceCtx->pOverallMbMap[ iCurMbIdx ];
   const int32_t kiSliceIdxStep  = pEncCtx->iActiveThreadsNum;