Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 6 files). Show all
Unified · Split
| @@ -1279,6 +1279,7 @@ int32_t ReallocateSliceInThread (sWelsEncCtx* pCtx, · 1278 unmodified lines | |||
| 1279 | } | 1279 | } |
| 1280 | */ | 1280 | */ |
| 1281 | 1281 | ||
| 1282 | |||
| 1282 | int32_t ReallocSliceBuffer (sWelsEncCtx* pCtx) { | 1283 | int32_t ReallocSliceBuffer (sWelsEncCtx* pCtx) { |
| 1283 | 1284 | ||
| 1284 | CMemoryAlign* pMA = pCtx->pMemAlign; | 1285 | CMemoryAlign* pMA = pCtx->pMemAlign; |
| @@ -1461,16 +1462,12 @@ int32_t SliceLayerInfoUpdate (sWelsEncCtx* pCtx, const int32_t kiDlayerIndex) { · 176 unmodified lines | |||
| 1461 | } | 1462 | } |
| 1462 | */ | 1463 | */ |
| 1463 | 1464 | ||
| 1464 | int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, const int32_t kiSliceIdx, const int32_t kiNalType) { | 1465 | int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, const int32_t kiNalType) { |
| 1465 | SDqLayer* pCurLayer = pEncCtx->pCurDqLayer; | 1466 | SDqLayer* pCurLayer = pEncCtx->pCurDqLayer; |
| 1466 | SNalUnitHeaderExt* pNalHeadExt = &pCurLayer->sLayerInfo.sNalHeaderExt; | 1467 | SNalUnitHeaderExt* pNalHeadExt = &pCurLayer->sLayerInfo.sNalHeaderExt; |
| 1467 | SSlice* pCurSlice = pCurLayer->ppSliceInLayer[kiSliceIdx]; | ||
| 1468 | SBitStringAux* pBs = pCurSlice->pSliceBsa; | 1468 | SBitStringAux* pBs = pCurSlice->pSliceBsa; |
| 1469 | const int32_t kiDynamicSliceFlag = (pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId].sSliceArgument.uiSliceMode | 1469 | const int32_t kiDynamicSliceFlag = (pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId].sSliceArgument.uiSliceMode |
| 1470 | == SM_SIZELIMITED_SLICE); | 1470 | == SM_SIZELIMITED_SLICE); |
| 1471 | |||
| 1472 | assert (kiSliceIdx == (int) pCurSlice->uiSliceIdx); | ||
| 1473 | |||
| 1474 | if (I_SLICE == pEncCtx->eSliceType) { | 1471 | if (I_SLICE == pEncCtx->eSliceType) { |
| 1475 | pNalHeadExt->bIdrFlag = 1; | 1472 | pNalHeadExt->bIdrFlag = 1; |
| 1476 | pCurSlice->sScaleShift = 0; | 1473 | pCurSlice->sScaleShift = 0; |