Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1284,7 +1284,7 @@ int32_t CalculateNewSliceNum (sWelsEncCtx* pCtx, · 1283 unmodified lines | ||
| 1284 | 1284 | return ENC_RETURN_SUCCESS; |
| 1285 | 1285 | } |
| 1286 | 1286 | |
| 1287 | − int32_t iPartitionID = pLastCodedSlice->iSliceIdx / pCtx->iActiveThreadsNum; | |
| 1287 | + int32_t iPartitionID = pLastCodedSlice->iSliceIdx % pCtx->iActiveThreadsNum; | |
| 1288 | 1288 | int32_t iMBNumInPatition = pCtx->pCurDqLayer->EndMbIdxOfPartition[iPartitionID] |
| 1289 | 1289 | - pCtx->pCurDqLayer->FirstMbIdxOfPartition[iPartitionID] + 1; |
| 1290 | 1290 | int32_t iLeftMBNum = pCtx->pCurDqLayer->EndMbIdxOfPartition[iPartitionID] |
| @@ -1302,9 +1302,10 @@ int32_t ReallocateSliceInThread (sWelsEncCtx* pCtx, · 11 unmodified lines | ||
| 1302 | 1302 | const int32_t kiDlayerIdx, |
| 1303 | 1303 | const int32_t KiSlcBuffIdx) { |
| 1304 | 1304 | int32_t iMaxSliceNum = pDqLayer->sSliceBufferInfo[KiSlcBuffIdx].iMaxSliceNum; |
| 1305 | + int32_t iCodedSliceNum = pDqLayer->sSliceBufferInfo[KiSlcBuffIdx].iCodedSliceNum; | |
| 1305 | 1306 | int32_t iMaxSliceNumNew = 0; |
| 1306 | 1307 | int32_t iRet = 0; |
| 1307 | − SSlice* pLastCodedSlice = &pDqLayer->sSliceBufferInfo[KiSlcBuffIdx].pSliceBuffer [iMaxSliceNum - 1]; | |
| 1308 | + SSlice* pLastCodedSlice = &pDqLayer->sSliceBufferInfo[KiSlcBuffIdx].pSliceBuffer [iCodedSliceNum - 1]; | |
| 1308 | 1309 | SSliceArgument* pSliceArgument = & pCtx->pSvcParam->sSpatialLayers[kiDlayerIdx].sSliceArgument; |
| 1309 | 1310 | |
| 1310 | 1311 | iRet = CalculateNewSliceNum (pCtx, |