shithub: openh264

Download patch

ref: fd7a02b557062f2657d6ae13578b000480187fe0
parent: d1fc0024309c459d7ae6118a67bdb3eb4b2e3645
parent: 8c7ef9c1a7ccb304286d77bd7b571b780eb6cc8e
author: HaiboZhu <[email protected]>
date: Wed Sep 2 06:10:02 EDT 2015

Merge pull request #2096 from ruil2/rc0

use individual iDecompositionStages for each spatial layer

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3865,7 +3865,7 @@
   while (iSpatialIdx < iSpatialNum) {
     const int32_t iDidIdx       = (pSpatialIndexMap + iSpatialIdx)->iDid;       // get iDid
     SSpatialLayerConfig* pParam = &pSvcParam->sSpatialLayers[iDidIdx];
-
+    int32_t  iDecompositionStages = pSvcParam->sDependencyLayers[iSpatialIdx].iDecompositionStages;
     pCtx->uiDependencyId        = iCurDid = (int8_t)iDidIdx;
     pCtx->pVpp->AnalyzeSpatialPic (pCtx, iDidIdx);
 
@@ -3923,9 +3923,9 @@
     }
     if (iCurTid == 0 || pCtx->eSliceType == I_SLICE)
       eNalRefIdc = NRI_PRI_HIGHEST;
-    else if (iCurTid == pSvcParam->iDecompStages)
+    else if (iCurTid == iDecompositionStages)
       eNalRefIdc = NRI_PRI_LOWEST;
-    else if (1 + iCurTid == pSvcParam->iDecompStages)
+    else if (1 + iCurTid == iDecompositionStages)
       eNalRefIdc = NRI_PRI_LOW;
     else // more details for other temporal layers?
       eNalRefIdc = NRI_PRI_HIGHEST;