Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 6 files). Show all
Unified · Split
| @@ -1605,10 +1605,11 @@ int32_t SliceLayerInfoUpdate (sWelsEncCtx* pCtx, · 1604 unmodified lines | |||
| 1605 | } | 1605 | } |
| 1606 | 1606 | ||
| 1607 | int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, const int32_t kiNalType) { | 1607 | int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, const int32_t kiNalType) { |
| 1608 | SDqLayer* pCurLayer = pEncCtx->pCurDqLayer; | 1608 | SDqLayer* pCurLayer = pEncCtx->pCurDqLayer; |
| 1609 | SNalUnitHeaderExt* pNalHeadExt = &pCurLayer->sLayerInfo.sNalHeaderExt; | 1609 | SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId]; |
| 1610 | SBitStringAux* pBs = pCurSlice->pSliceBsa; | 1610 | SNalUnitHeaderExt* pNalHeadExt = &pCurLayer->sLayerInfo.sNalHeaderExt; |
| 1611 | const int32_t kiDynamicSliceFlag = (pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId].sSliceArgument.uiSliceMode | 1611 | SBitStringAux* pBs = pCurSlice->pSliceBsa; |
| 1612 | const int32_t kiDynamicSliceFlag = (pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId].sSliceArgument.uiSliceMode | ||
| 1612 | == SM_SIZELIMITED_SLICE); | 1613 | == SM_SIZELIMITED_SLICE); |
| 1613 | if (I_SLICE == pEncCtx->eSliceType) { | 1614 | if (I_SLICE == pEncCtx->eSliceType) { |
| 1614 | pNalHeadExt->bIdrFlag = 1; | 1615 | pNalHeadExt->bIdrFlag = 1; |
| @@ -1620,8 +1621,10 @@ int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, const int32_t · 5 unmodified lines | |||
| 1620 | 1621 | ||
| 1621 | WelsSliceHeaderExtInit (pEncCtx, pCurLayer, pCurSlice); | 1622 | WelsSliceHeaderExtInit (pEncCtx, pCurLayer, pCurSlice); |
| 1622 | 1623 | ||
| 1623 | //init slice RC information | 1624 | //RomRC init slice by slice |
| 1624 | RCInitOneSliceInformation(pEncCtx, pCurSlice); | 1625 | if (pWelsSvcRc->bGomRC) { |
| 1626 | GomRCInitForOneSlice(pCurSlice, pWelsSvcRc->iBitsPerMb); | ||
| 1627 | } | ||
| 1625 | 1628 | ||
| 1626 | g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pEncCtx, pBs, pCurLayer, pCurSlice, | 1629 | g_pWelsWriteSliceHeader[pCurSlice->bSliceHeaderExtFlag] (pEncCtx, pBs, pCurLayer, pCurSlice, |
| 1627 | pEncCtx->pFuncList->pParametersetStrategy); | 1630 | pEncCtx->pFuncList->pParametersetStrategy); |