History

Multi-thread-fixed:RBC#1751:Dynamic slice mode under multiThread reallocate feature enable

huade committed 9 years ago

Commit 095f0b61 parent 623599014 files · +325 −336Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+62−66
@@ -927,7 +927,7 @@ void FreeSliceInLayer (SDqLayer* pDq, CMemoryAlign* pMa) { · 926 unmodified lines
927 for (; iIdx < MAX_THREADS_NUM; iIdx ++) {927 for (; iIdx < MAX_THREADS_NUM; iIdx ++) {
928 FreeSliceBuffer (pDq->sSliceThreadInfo.pSliceInThread[iIdx],928 FreeSliceBuffer (pDq->sSliceThreadInfo.pSliceInThread[iIdx],
929 pDq->sSliceThreadInfo.iMaxSliceNumInThread[iIdx],929 pDq->sSliceThreadInfo.iMaxSliceNumInThread[iIdx],
930 pMa, "pSliceInLayer");930 pMa, "pSliceInThread");
931 }931 }
932}932}
933 933
@@ -939,40 +939,20 @@ void FreeDqLayer (SDqLayer*& pDq, CMemoryAlign* pMa) { · 5 unmodified lines
939 FreeSliceInLayer (pDq, pMa);939 FreeSliceInLayer (pDq, pMa);
940 940
941 if (pDq->ppSliceInLayer) {941 if (pDq->ppSliceInLayer) {
942 pMa->WelsFree (pDq->ppSliceInLayer, "pDq->ppSliceInLayer");942 pMa->WelsFree (pDq->ppSliceInLayer, "ppSliceInLayer");
943 pDq->ppSliceInLayer = NULL;943 pDq->ppSliceInLayer = NULL;
944 }944 }
945 945
946 if (pDq->pFirstMbIdxOfSlice) {946 if (pDq->pFirstMbIdxOfSlice) {
947 pMa->WelsFree (pDq->pFirstMbIdxOfSlice, "pDq->pFirstMbIdxOfSlice");947 pMa->WelsFree (pDq->pFirstMbIdxOfSlice, "pFirstMbIdxOfSlice");
948 pDq->pFirstMbIdxOfSlice = NULL;948 pDq->pFirstMbIdxOfSlice = NULL;
949 }949 }
950 950
951 if (pDq->pCountMbNumInSlice) {951 if (pDq->pCountMbNumInSlice) {
952 pMa->WelsFree (pDq->pCountMbNumInSlice, "pDq->pCountMbNumInSlice");952 pMa->WelsFree (pDq->pCountMbNumInSlice, "pCountMbNumInSlice");
953 pDq->pCountMbNumInSlice = NULL;953 pDq->pCountMbNumInSlice = NULL;
954 }954 }
955 955
956 if (pDq->pNumSliceCodedOfPartition) {
957 pMa->WelsFree (pDq->pNumSliceCodedOfPartition, "pNumSliceCodedOfPartition");
958 pDq->pNumSliceCodedOfPartition = NULL;
959 }
960
961 if (pDq->pLastCodedMbIdxOfPartition) {
962 pMa->WelsFree (pDq->pLastCodedMbIdxOfPartition, "pLastCodedMbIdxOfPartition");
963 pDq->pLastCodedMbIdxOfPartition = NULL;
964 }
965
966 if (pDq->pFirstMbIdxOfPartition) {
967 pMa->WelsFree (pDq->pFirstMbIdxOfPartition, "pFirstMbIdxOfPartition");
968 pDq->pFirstMbIdxOfPartition = NULL;
969 }
970
971 if (pDq->pEndMbIdxOfPartition) {
972 pMa->WelsFree (pDq->pEndMbIdxOfPartition, "pEndMbIdxOfPartition");
973 pDq->pEndMbIdxOfPartition = NULL;
974 }
975
976 if (pDq->pFeatureSearchPreparation) {956 if (pDq->pFeatureSearchPreparation) {
977 ReleaseFeatureSearchPreparation (pMa, pDq->pFeatureSearchPreparation->pFeatureOfBlock);957 ReleaseFeatureSearchPreparation (pMa, pDq->pFeatureSearchPreparation->pFeatureOfBlock);
978 pMa->WelsFree (pDq->pFeatureSearchPreparation, "pFeatureSearchPreparation");958 pMa->WelsFree (pDq->pFeatureSearchPreparation, "pFeatureSearchPreparation");
@@ -1083,21 +1063,6 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 104 unmodified lines
1083 pDqLayer = (SDqLayer*)pMa->WelsMallocz (sizeof (SDqLayer), "pDqLayer");1063 pDqLayer = (SDqLayer*)pMa->WelsMallocz (sizeof (SDqLayer), "pDqLayer");
1084 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pDqLayer), FreeDqLayer (pDqLayer, pMa))1064 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pDqLayer), FreeDqLayer (pDqLayer, pMa))
1085 1065
1086 // for dynamic slicing mode
1087 if (SM_SIZELIMITED_SLICE == pDlayer->sSliceArgument.uiSliceMode) {
1088 const int32_t iSize = pParam->iMultipleThreadIdc * sizeof (int32_t);
1089
1090 pDqLayer->pNumSliceCodedOfPartition = (int32_t*)pMa->WelsMallocz (iSize, "pNumSliceCodedOfPartition");
1091 pDqLayer->pLastCodedMbIdxOfPartition = (int32_t*)pMa->WelsMallocz (iSize, "pLastCodedMbIdxOfPartition");
1092 pDqLayer->pFirstMbIdxOfPartition = (int32_t*)pMa->WelsMallocz (iSize, "pFirstMbIdxOfPartition");
1093 pDqLayer->pEndMbIdxOfPartition = (int32_t*)pMa->WelsMallocz (iSize, "pEndMbIdxOfPartition");
1094 WELS_VERIFY_RETURN_PROC_IF (1,
1095 (NULL == pDqLayer->pNumSliceCodedOfPartition ||
1096 NULL == pDqLayer->pLastCodedMbIdxOfPartition ||
1097 NULL == pDqLayer->pFirstMbIdxOfPartition ||
1098 NULL == pDqLayer->pEndMbIdxOfPartition),
1099 FreeDqLayer (pDqLayer, pMa))
1100 }
1101 pDqLayer->bNeedAdjustingSlicing = false;1066 pDqLayer->bNeedAdjustingSlicing = false;
1102 1067
1103 pDqLayer->iMbWidth = kiMbW;1068 pDqLayer->iMbWidth = kiMbW;
@@ -2453,7 +2418,13 @@ void UpdateSlicepEncCtxWithPartition (SDqLayer* pCurDq, int32_t iPartitionNum) { · 1349 unmodified lines
2453 else if (iPartitionNum > AVERSLICENUM_CONSTRAINT)2418 else if (iPartitionNum > AVERSLICENUM_CONSTRAINT)
2454 iPartitionNum = AVERSLICENUM_CONSTRAINT; // AVERSLICENUM_CONSTRAINT might be variable, however not fixed by MACRO2419 iPartitionNum = AVERSLICENUM_CONSTRAINT; // AVERSLICENUM_CONSTRAINT might be variable, however not fixed by MACRO
2455 iCountMbNumPerPartition /= iPartitionNum;2420 iCountMbNumPerPartition /= iPartitionNum;
2421 if(iCountMbNumPerPartition == 0 || iCountMbNumPerPartition == 1) {
2422 iCountMbNumPerPartition = kiMbNumInFrame;
2423 iPartitionNum = 1;
2424 }
2425
2456 pSliceCtx->iSliceNumInFrame = iPartitionNum;2426 pSliceCtx->iSliceNumInFrame = iPartitionNum;
2427
2457 i = 0;2428 i = 0;
2458 while (i < iPartitionNum) {2429 while (i < iPartitionNum) {
2459 if (i + 1 == iPartitionNum) {2430 if (i + 1 == iPartitionNum) {
@@ -2462,8 +2433,10 @@ void UpdateSlicepEncCtxWithPartition (SDqLayer* pCurDq, int32_t iPartitionNum) { · 2 unmodified lines
2462 iCountMbNumInPartition = iCountMbNumPerPartition;2433 iCountMbNumInPartition = iCountMbNumPerPartition;
2463 }2434 }
2464 2435
2465 pCurDq->pFirstMbIdxOfPartition[i] = iFirstMbIdx;2436 pCurDq->FirstMbIdxOfPartition[i] = iFirstMbIdx;
2466 pCurDq->pEndMbIdxOfPartition[i] = iFirstMbIdx + iCountMbNumInPartition - 1;2437 pCurDq->EndMbIdxOfPartition[i] = iFirstMbIdx + iCountMbNumInPartition - 1;
2438 pCurDq->LastCodedMbIdxOfPartition[i] = 0;
2439 pCurDq->NumSliceCodedOfPartition[i] = 0;
2467 2440
2468 WelsSetMemMultiplebytes_c (pSliceCtx->pOverallMbMap + iFirstMbIdx, i,2441 WelsSetMemMultiplebytes_c (pSliceCtx->pOverallMbMap + iFirstMbIdx, i,
2469 iCountMbNumInPartition, sizeof (uint16_t));2442 iCountMbNumInPartition, sizeof (uint16_t));
@@ -2473,6 +2446,14 @@ void UpdateSlicepEncCtxWithPartition (SDqLayer* pCurDq, int32_t iPartitionNum) { · 3 unmodified lines
2473 iAssignableMbLeft -= iCountMbNumInPartition;2446 iAssignableMbLeft -= iCountMbNumInPartition;
2474 ++ i;2447 ++ i;
2475 }2448 }
2449
2450 while(i<MAX_THREADS_NUM) {
2451 pCurDq->FirstMbIdxOfPartition[i] = 0;
2452 pCurDq->EndMbIdxOfPartition[i] = 0;
2453 pCurDq->LastCodedMbIdxOfPartition[i] = 0;
2454 pCurDq->NumSliceCodedOfPartition[i] = 0;
2455 ++ i;
2456 }
2476}2457}
2477 2458
2478void WelsInitCurrentDlayerMltslc (sWelsEncCtx* pCtx, int32_t iPartitionNum) {2459void WelsInitCurrentDlayerMltslc (sWelsEncCtx* pCtx, int32_t iPartitionNum) {
@@ -2537,22 +2518,17 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 58 unmodified lines
2537 SSlice* pBaseSlice = pCurDq->ppSliceInLayer[0];2518 SSlice* pBaseSlice = pCurDq->ppSliceInLayer[0];
2538 const uint8_t kiCurDid = pCtx->uiDependencyId;2519 const uint8_t kiCurDid = pCtx->uiDependencyId;
2539 const bool kbUseSubsetSpsFlag = (!pParam->bSimulcastAVC) && (kiCurDid > BASE_DEPENDENCY_ID);2520 const bool kbUseSubsetSpsFlag = (!pParam->bSimulcastAVC) && (kiCurDid > BASE_DEPENDENCY_ID);
2540 SSpatialLayerConfig* fDlp = &pParam->sSpatialLayers[kiCurDid];
2541 SNalUnitHeaderExt* pNalHdExt = &pCurDq->sLayerInfo.sNalHeaderExt;2521 SNalUnitHeaderExt* pNalHdExt = &pCurDq->sLayerInfo.sNalHeaderExt;
2542 SNalUnitHeader* pNalHd = &pNalHdExt->sNalUnitHeader;2522 SNalUnitHeader* pNalHd = &pNalHdExt->sNalUnitHeader;
2543 SDqIdc* pDqIdc = &pCtx->pDqIdcMap[kiCurDid];2523 SDqIdc* pDqIdc = &pCtx->pDqIdcMap[kiCurDid];
2544 int32_t iIdx = 0;2524 int32_t iIdx = 0;
2545 int32_t iSliceCount = 0;2525 int32_t iSliceCount = pCurDq->iMaxSliceNum;
2546 SSpatialLayerInternal* pParamInternal = &pParam->sDependencyLayers[kiCurDid];2526 SSpatialLayerInternal* pParamInternal = &pParam->sDependencyLayers[kiCurDid];
2547 if (NULL == pCurDq || NULL == pBaseSlice)2527 if (NULL == pCurDq || NULL == pBaseSlice)
2548 return;2528 return;
2549 2529
2550 pCurDq->pDecPic = pDecPic;2530 pCurDq->pDecPic = pDecPic;
2551 2531
2552 if (fDlp->sSliceArgument.uiSliceMode == SM_SIZELIMITED_SLICE) // need get extra slices for update
2553 iSliceCount = GetInitialSliceNum (pCurDq->iMbWidth, pCurDq->iMbHeight, &fDlp->sSliceArgument);
2554 else
2555 iSliceCount = GetCurrentSliceNum (pCurDq);
2556 assert (iSliceCount > 0);2532 assert (iSliceCount > 0);
2557 2533
2558 int32_t iCurPpsId = pDqIdc->iPpsId;2534 int32_t iCurPpsId = pDqIdc->iPpsId;
@@ -2809,7 +2785,7 @@ static inline void WelsSwapDqLayers (sWelsEncCtx* pCtx, const int32_t kiNextDqId · 250 unmodified lines
2809 * \brief prefetch reference picture after WelsBuildRefList2785 * \brief prefetch reference picture after WelsBuildRefList
2810 */2786 */
2811static inline void PrefetchReferencePicture (sWelsEncCtx* pCtx, const EVideoFrameType keFrameType) {2787static inline void PrefetchReferencePicture (sWelsEncCtx* pCtx, const EVideoFrameType keFrameType) {
2812 const int32_t kiSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer);2788 const int32_t kiSliceCount = pCtx->pCurDqLayer->iMaxSliceNum;
2813 int32_t iIdx = 0;2789 int32_t iIdx = 0;
2814 uint8_t uiRefIdx = -1;2790 uint8_t uiRefIdx = -1;
2815 2791
@@ -3494,6 +3470,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 678 unmodified lines
3494 pCtx->pSvcParam->sSpatialLayers[pCtx->pSvcParam->iSpatialLayerNum - 1].fFrameRate);3470 pCtx->pSvcParam->sSpatialLayers[pCtx->pSvcParam->iSpatialLayerNum - 1].fFrameRate);
3495 for (int32_t iNalIdx = 0; iNalIdx < MAX_LAYER_NUM_OF_FRAME; iNalIdx++) {3471 for (int32_t iNalIdx = 0; iNalIdx < MAX_LAYER_NUM_OF_FRAME; iNalIdx++) {
3496 pFbi->sLayerInfo[iNalIdx].eFrameType = videoFrameTypeSkip;3472 pFbi->sLayerInfo[iNalIdx].eFrameType = videoFrameTypeSkip;
3473 pFbi->sLayerInfo[iNalIdx].iNalCount = 0;
3497 }3474 }
3498 // perform csc/denoise/downsample/padding, generate spatial layers3475 // perform csc/denoise/downsample/padding, generate spatial layers
3499 iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, pSrcPic);3476 iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, pSrcPic);
@@ -3666,7 +3643,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 166 unmodified lines
3666 3643
3667 //TODO Complexity Calculation here for screen content3644 //TODO Complexity Calculation here for screen content
3668 iLayerSize = 0;3645 iLayerSize = 0;
3669
3670 if (SM_SINGLE_SLICE == pParam->sSliceArgument.uiSliceMode) { // only one slice within a sQualityStat layer3646 if (SM_SINGLE_SLICE == pParam->sSliceArgument.uiSliceMode) { // only one slice within a sQualityStat layer
3671 int32_t iSliceSize = 0;3647 int32_t iSliceSize = 0;
3672 int32_t iPayloadSize = 0;3648 int32_t iPayloadSize = 0;
@@ -3744,7 +3720,14 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 71 unmodified lines
3744 pLayerBsInfo->eFrameType = eFrameType;3720 pLayerBsInfo->eFrameType = eFrameType;
3745 pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);3721 pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
3746 3722
3747 //InitAllSlicesInThread(pCtx);3723 int32_t iRet = InitAllSlicesInThread(pCtx);
3724 if (iRet) {
3725 WelsLog (pLogCtx, WELS_LOG_ERROR,
3726 "WelsEncoderEncodeExt(), multi-slice (mode %d) InitAllSlicesInThread() error!",
3727 pParam->sSliceArgument.uiSliceMode);
3728 return ENC_RETURN_UNEXPECTED;
3729 }
3730
3748 pCtx->pTaskManage->ExecuteTasks();3731 pCtx->pTaskManage->ExecuteTasks();
3749 if (pCtx->iEncoderError) {3732 if (pCtx->iEncoderError) {
3750 WelsLog (pLogCtx, WELS_LOG_ERROR,3733 WelsLog (pLogCtx, WELS_LOG_ERROR,
@@ -3753,8 +3736,14 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2 unmodified lines
3753 return pCtx->iEncoderError;3736 return pCtx->iEncoderError;
3754 }3737 }
3755 3738
3756 //TO DO: add update ppSliceInLayer module based on pSliceInThread[ThreadNum]3739 iRet = SliceLayerInfoUpdate (pCtx, pFbi, pLayerBsInfo, pParam->sSliceArgument.uiSliceMode);
3757 //SliceLayerInfoUpdate (pCtx, pFbi, pLayerBsInfo, 1);3740 if (iRet) {
3741 WelsLog (pLogCtx, WELS_LOG_ERROR,
3742 "WelsEncoderEncodeExt(), multi-slice (mode %d) SliceLayerInfoUpdate() error!",
3743 pParam->sSliceArgument.uiSliceMode);
3744 return ENC_RETURN_UNEXPECTED;
3745 }
3746
3758 iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, iSliceCount);3747 iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, iSliceCount);
3759 }3748 }
3760 // THREAD_FULLY_FIRE_MODE && SM_SIZELIMITED_SLICE3749 // THREAD_FULLY_FIRE_MODE && SM_SIZELIMITED_SLICE
@@ -3797,6 +3786,13 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 36 unmodified lines
3797 ++ iIdx;3786 ++ iIdx;
3798 }3787 }
3799 3788
3789 int32_t iRet = InitAllSlicesInThread(pCtx);
3790 if (iRet) {
3791 WelsLog (pLogCtx, WELS_LOG_ERROR,
3792 "WelsEncoderEncodeExt(), multi-slice (mode %d) InitAllSlicesInThread() error!",
3793 pParam->sSliceArgument.uiSliceMode);
3794 return ENC_RETURN_UNEXPECTED;
3795 }
3800 pCtx->pTaskManage->ExecuteTasks();3796 pCtx->pTaskManage->ExecuteTasks();
3801 3797
3802 if (pCtx->iEncoderError) {3798 if (pCtx->iEncoderError) {
@@ -3805,10 +3801,17 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2 unmodified lines
3805 pParam->sSliceArgument.uiSliceMode, pCtx->iEncoderError);3801 pParam->sSliceArgument.uiSliceMode, pCtx->iEncoderError);
3806 return pCtx->iEncoderError;3802 return pCtx->iEncoderError;
3807 }3803 }
3808#endif 3804#endif
3809 //TO DO: add update ppSliceInLayer module based on pSliceInThread[ThreadNum]3805 iRet = SliceLayerInfoUpdate (pCtx, pFbi, pLayerBsInfo, pParam->sSliceArgument.uiSliceMode);
3810 // UpdateSliceInLayerInfo(); // reordering3806 if (iRet) {
3811 iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, kiPartitionCnt);3807 WelsLog (pLogCtx, WELS_LOG_ERROR,
3808 "WelsEncoderEncodeExt(), multi-slice (mode %d) InitAllSlicesInThread() error!",
3809 pParam->sSliceArgument.uiSliceMode);
3810 return ENC_RETURN_UNEXPECTED;
3811 }
3812
3813 iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer);
3814 iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, iSliceCount);
3812 } else { // for non-dynamic-slicing mode single threading branch..3815 } else { // for non-dynamic-slicing mode single threading branch..
3813 const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag;3816 const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag;
3814 int32_t iSliceIdx = 0;3817 int32_t iSliceIdx = 0;
@@ -3833,7 +3836,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 18 unmodified lines
3833 pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][iSliceIdx];3836 pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][iSliceIdx];
3834 assert (iSliceIdx == pCurSlice->iSliceIdx);3837 assert (iSliceIdx == pCurSlice->iSliceIdx);
3835 pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx);3838 pCtx->iEncoderError = SetSliceBoundaryInfo(pCtx->pCurDqLayer, pCurSlice, iSliceIdx);
3836 WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
3837 3839
3838 pCtx->iEncoderError = WelsCodeOneSlice (pCtx, pCurSlice, eNalType);3840 pCtx->iEncoderError = WelsCodeOneSlice (pCtx, pCurSlice, eNalType);
3839 WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)3841 WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
@@ -4492,13 +4494,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 652 unmodified lines
4492 const int32_t kiSliceIdxStep = pCtx->iActiveThreadsNum;4494 const int32_t kiSliceIdxStep = pCtx->iActiveThreadsNum;
4493 int32_t iReturn = ENC_RETURN_SUCCESS;4495 int32_t iReturn = ENC_RETURN_SUCCESS;
4494 4496
4495 4497 pStartSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice = iFirstMbIdxInPartition;
4496 //init
4497 {
4498 pStartSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice = iFirstMbIdxInPartition;
4499 pCurLayer->pNumSliceCodedOfPartition[kiPartitionId] = 1;
4500 }
4501 pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = 0;
4502 4498
4503 while (iAnyMbLeftInPartition > 0) {4499 while (iAnyMbLeftInPartition > 0) {
4504 int32_t iSliceSize = 0;4500 int32_t iSliceSize = 0;
@@ -4530,7 +4526,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 25 unmodified lines
4530 4526
4531 WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc);4527 WelsLoadNal (pCtx->pOut, keNalType, keNalRefIdc);
4532 pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][iSliceIdx];4528 pCurSlice = &pCtx->pCurDqLayer->sSliceThreadInfo.pSliceInThread[uiTheadIdx][iSliceIdx];
4533 assert (iSliceIdx == pCurSlice->iSliceIdx);4529 pCurSlice->iSliceIdx = iSliceIdx;
4534 4530
4535 iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType);4531 iReturn = WelsCodeOneSlice (pCtx, pCurSlice, keNalType);
4536 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)4532 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
@@ -4558,7 +4554,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 21 unmodified lines
4558 4554
4559 ++ iNalIdxInLayer;4555 ++ iNalIdxInLayer;
4560 iSliceIdx += kiSliceStep; //if iSliceIdx is not continuous4556 iSliceIdx += kiSliceStep; //if iSliceIdx is not continuous
4561 iAnyMbLeftInPartition = iEndMbIdxInPartition - pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId];4557 iAnyMbLeftInPartition = iEndMbIdxInPartition - pCurLayer->LastCodedMbIdxOfPartition[kiPartitionId];
4562 }4558 }
4563 4559
4564 *pLayerSize = iPartitionBsSize;4560 *pLayerSize = iPartitionBsSize;

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