History

cleanup interface parameters

ruil2 committed 12 years ago

Commit 7acf0e51 parent 91cd93e11 files · +273 −261Browse files

Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 11 files). Show all

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+10−8
@@ -322,7 +322,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 321 unmodified lines
322 322
323 iIdx = 0;323 iIdx = 0;
324 while (iIdx < iNumSpatialLayers) {324 while (iIdx < iNumSpatialLayers) {
325 SSliceConfig* pMso = &pPara->sDependencyLayers[iIdx].sSliceCfg;325 SSliceConfig* pMso = &pPara->sSpatialLayers[iIdx].sSliceCfg;
326 const int32_t kiSliceNum = pMso->sSliceArgument.uiSliceNum;326 const int32_t kiSliceNum = pMso->sSliceArgument.uiSliceNum;
327 if (((pMso->uiSliceMode == SM_FIXEDSLCNUM_SLICE) || (pMso->uiSliceMode == SM_AUTO_SLICE))327 if (((pMso->uiSliceMode == SM_FIXEDSLCNUM_SLICE) || (pMso->uiSliceMode == SM_AUTO_SLICE))
328 && pPara->iMultipleThreadIdc > 1328 && pPara->iMultipleThreadIdc > 1
@@ -520,7 +520,7 @@ void ReleaseMtResource (sWelsEncCtx** ppCtx) { · 191 unmodified lines
520 520
521int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32_t iSliceCount) {521int32_t AppendSliceToFrameBs (sWelsEncCtx* pCtx, SLayerBSInfo* pLbi, const int32_t iSliceCount) {
522 SWelsSvcCodingParam* pCodingParam = pCtx->pSvcParam;522 SWelsSvcCodingParam* pCodingParam = pCtx->pSvcParam;
523 SDLayerParam* pDlp = &pCodingParam->sDependencyLayers[pCtx->uiDependencyId];523 SSpatialLayerConfig* pDlp = &pCodingParam->sSpatialLayers[pCtx->uiDependencyId];
524 SWelsSliceBs* pSliceBs = NULL;524 SWelsSliceBs* pSliceBs = NULL;
525 const bool kbIsDynamicSlicingMode = (pDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE);525 const bool kbIsDynamicSlicingMode = (pDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE);
526 526
@@ -717,7 +717,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 190 unmodified lines
717 const int32_t kiCurDid = pEncPEncCtx->uiDependencyId;717 const int32_t kiCurDid = pEncPEncCtx->uiDependencyId;
718 const int32_t kiCurTid = pEncPEncCtx->uiTemporalId;718 const int32_t kiCurTid = pEncPEncCtx->uiTemporalId;
719 SWelsSvcCodingParam* pCodingParam = pEncPEncCtx->pSvcParam;719 SWelsSvcCodingParam* pCodingParam = pEncPEncCtx->pSvcParam;
720 SDLayerParam* pParamD = &pCodingParam->sDependencyLayers[kiCurDid];720 SSpatialLayerConfig* pParamD = &pCodingParam->sSpatialLayers[kiCurDid];
721 721
722 pCurDq = pEncPEncCtx->pCurDqLayer;722 pCurDq = pEncPEncCtx->pCurDqLayer;
723 eNalType = pEncPEncCtx->eNalType;723 eNalType = pEncPEncCtx->eNalType;
@@ -788,7 +788,8 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 64 unmodified lines
788 if (pCurDq->bDeblockingParallelFlag && pSlice->sSliceHeaderExt.sSliceHeader.uiDisableDeblockingFilterIdc != 1788 if (pCurDq->bDeblockingParallelFlag && pSlice->sSliceHeaderExt.sSliceHeader.uiDisableDeblockingFilterIdc != 1
789#if !defined(ENABLE_FRAME_DUMP)789#if !defined(ENABLE_FRAME_DUMP)
790 && (eNalRefIdc != NRI_PRI_LOWEST) &&790 && (eNalRefIdc != NRI_PRI_LOWEST) &&
791 (pParamD->iHighestTemporalId == 0 || kiCurTid < pParamD->iHighestTemporalId)791 (pCodingParam->sDependencyLayers[kiCurDid].iHighestTemporalId == 0
792 || kiCurTid < pCodingParam->sDependencyLayers[kiCurDid].iHighestTemporalId)
792#endif// !ENABLE_FRAME_DUMP793#endif// !ENABLE_FRAME_DUMP
793 ) {794 ) {
794 DeblockingFilterSliceAvcbase (pCurDq, pEncPEncCtx->pFuncList, iSliceIdx);795 DeblockingFilterSliceAvcbase (pCurDq, pEncPEncCtx->pFuncList, iSliceIdx);
@@ -896,7 +897,8 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 101 unmodified lines
896 if (pCurDq->bDeblockingParallelFlag && pSlice->sSliceHeaderExt.sSliceHeader.uiDisableDeblockingFilterIdc != 1897 if (pCurDq->bDeblockingParallelFlag && pSlice->sSliceHeaderExt.sSliceHeader.uiDisableDeblockingFilterIdc != 1
897#if !defined(ENABLE_FRAME_DUMP)898#if !defined(ENABLE_FRAME_DUMP)
898 && (eNalRefIdc != NRI_PRI_LOWEST) &&899 && (eNalRefIdc != NRI_PRI_LOWEST) &&
899 (pParamD->iHighestTemporalId == 0 || kiCurTid < pParamD->iHighestTemporalId)900 (pCodingParam->sDependencyLayers[kiCurDid].iHighestTemporalId == 0
901 || kiCurTid < pCodingParam->sDependencyLayers[kiCurDid].iHighestTemporalId)
900#endif// !ENABLE_FRAME_DUMP902#endif// !ENABLE_FRAME_DUMP
901 ) {903 ) {
902 DeblockingFilterSliceAvcbase (pCurDq, pEncPEncCtx->pFuncList, iSliceIdx);904 DeblockingFilterSliceAvcbase (pCurDq, pEncPEncCtx->pFuncList, iSliceIdx);
@@ -1050,8 +1052,8 @@ int32_t AdjustEnhanceLayer (sWelsEncCtx* pCtx, int32_t iCurDid) { · 147 unmodified lines
1050 // if using spatial base layer for complexity estimation1052 // if using spatial base layer for complexity estimation
1051 1053
1052 const bool kbModelingFromSpatial = (pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)1054 const bool kbModelingFromSpatial = (pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)
1053 && (pCtx->pSvcParam->sDependencyLayers[iCurDid - 1].sSliceCfg.uiSliceMode == SM_FIXEDSLCNUM_SLICE1055 && (pCtx->pSvcParam->sSpatialLayers[iCurDid - 1].sSliceCfg.uiSliceMode == SM_FIXEDSLCNUM_SLICE
1054 && pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sDependencyLayers[iCurDid -1056 && pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sSpatialLayers[iCurDid -
1055 1].sSliceCfg.sSliceArgument.uiSliceNum);1057 1].sSliceCfg.sSliceArgument.uiSliceNum);
1056 1058
1057 if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation1059 if (kbModelingFromSpatial) { // using spatial base layer for complexity estimation
@@ -1115,7 +1117,7 @@ void TrackSliceConsumeTime (sWelsEncCtx* pCtx, int32_t* pDidList, const int32_t · 57 unmodified lines
1115 pPara = pCtx->pSvcParam;1117 pPara = pCtx->pSvcParam;
1116 while (iSpatialIdx < iSpatialNum) {1118 while (iSpatialIdx < iSpatialNum) {
1117 const int32_t kiDid = pDidList[iSpatialIdx];1119 const int32_t kiDid = pDidList[iSpatialIdx];
1118 SDLayerParam* pDlp = &pPara->sDependencyLayers[kiDid];1120 SSpatialLayerInternal* pDlp = &pPara->sDependencyLayers[kiDid];
1119 SSliceConfig* pMso = &pDlp->sSliceCfg;1121 SSliceConfig* pMso = &pDlp->sSliceCfg;
1120 SDqLayer* pCurDq = pCtx->ppDqLayerList[kiDid];1122 SDqLayer* pCurDq = pCtx->ppDqLayerList[kiDid];
1121 SSliceCtx* pSliceCtx = pCurDq->pSliceEncCtx;1123 SSliceCtx* pSliceCtx = pCurDq->pSliceEncCtx;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t