History

modify the interface that use a independent subseqID for each layer

Karina committed 10 years ago

Commit ac376661 parent a5e4cca2 files · +21 −16Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+16−8
@@ -3181,6 +3181,7 @@ int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) { · 3180 unmodified lines
31813181 pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER;
31823182 pLayerBsInfo->iNalCount = iCountNal;
31833183 pLayerBsInfo->eFrameType = videoFrameTypeInvalid;
3184+ pLayerBsInfo->iSubSeqId = 0;
31843185 //pCtx->eLastNalPriority = NRI_PRI_HIGHEST;
31853186 pFbi->iLayerNum = 1;
31863187 pFbi->eFrameType = videoFrameTypeInvalid;
@@ -3218,6 +3219,7 @@ int32_t WriteSsvcParaset (sWelsEncCtx* pCtx, const int32_t kiSpatialNum, · 31 unmodified lines
32183219 pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER;
32193220 pLayerBsInfo->iNalCount = iCountNal;
32203221 pLayerBsInfo->eFrameType = videoFrameTypeIDR;
3222+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, videoFrameTypeIDR);
32213223 //point to next pLayerBsInfo
32223224 ++ pLayerBsInfo;
32233225 ++ pCtx->pOut->iLayerBsIndex;
@@ -3262,6 +3264,7 @@ int32_t WriteSavcParaset (sWelsEncCtx* pCtx, const int32_t iIdx, · 38 unmodified lines
32623264 pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER;
32633265 pLayerBsInfo->iNalCount = iCountNal;
32643266 pLayerBsInfo->eFrameType = videoFrameTypeIDR;
3267+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, videoFrameTypeIDR);
32653268 //point to next pLayerBsInfo
32663269 ++ pLayerBsInfo;
32673270 ++ pCtx->pOut->iLayerBsIndex;
@@ -3296,6 +3299,7 @@ int32_t WriteSavcParaset (sWelsEncCtx* pCtx, const int32_t iIdx, · 28 unmodified lines
32963299 pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER;
32973300 pLayerBsInfo->iNalCount = iCountNal;
32983301 pLayerBsInfo->eFrameType = videoFrameTypeIDR;
3302+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, videoFrameTypeIDR);
32993303 //point to next pLayerBsInfo
33003304 ++ pLayerBsInfo;
33013305 ++ pCtx->pOut->iLayerBsIndex;
@@ -3343,6 +3347,7 @@ int32_t WriteSavcParaset_Listing (sWelsEncCtx* pCtx, const int32_t kiSpatialNum, · 41 unmodified lines
33433347 pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER;
33443348 pLayerBsInfo->iNalCount = iCountNal;
33453349 pLayerBsInfo->eFrameType = videoFrameTypeIDR;
3350+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, videoFrameTypeIDR);
33463351 //point to next pLayerBsInfo
33473352 ++ pLayerBsInfo;
33483353 ++ pCtx->pOut->iLayerBsIndex;
@@ -3376,6 +3381,7 @@ int32_t WriteSavcParaset_Listing (sWelsEncCtx* pCtx, const int32_t kiSpatialNum, · 27 unmodified lines
33763381 pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER;
33773382 pLayerBsInfo->iNalCount = iCountNal;
33783383 pLayerBsInfo->eFrameType = videoFrameTypeIDR;
3384+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, videoFrameTypeIDR);
33793385 //point to next pLayerBsInfo
33803386 ++ pLayerBsInfo;
33813387 ++ pCtx->pOut->iLayerBsIndex;
@@ -3772,6 +3778,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 390 unmodified lines
37723778 pLayerBsInfo->uiQualityId = 0;
37733779 pLayerBsInfo->iNalCount = ++ iNalIdxInLayer;
37743780 pLayerBsInfo->eFrameType = eFrameType;
3781+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
37753782 }
37763783 // for dynamic slicing single threading..
37773784 else if ((SM_SIZELIMITED_SLICE == pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc <= 1)) {
@@ -3779,6 +3786,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 1 unmodified line
37793786 pCtx->iEncoderError = WelsCodeOnePicPartition (pCtx, pFbi, pLayerBsInfo, &iNalIdxInLayer, &iLayerSize, 0,
37803787 kiLastMbInFrame, 0);
37813788 pLayerBsInfo->eFrameType = eFrameType;
3789+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
37823790 WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
37833791 } else {
37843792 //other multi-slice uiSliceMode
@@ -3805,6 +3813,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 20 unmodified lines
38053813 pLayerBsInfo->uiQualityId = 0;
38063814 pLayerBsInfo->iNalCount = 0;
38073815 pLayerBsInfo->eFrameType = eFrameType;
3816+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
38083817 pCtx->pTaskManage->ExecuteTasks();
38093818 if (pCtx->iEncoderError) {
38103819 WelsLog (pLogCtx, WELS_LOG_ERROR,
@@ -3856,7 +3865,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 45 unmodified lines
38563865 pLbi->uiQualityId = 0;
38573866 pLbi->iNalCount = 0;
38583867 pLbi->eFrameType = eFrameType;
3859−
3868+ pLbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
38603869 int32_t iIdx = 0;
38613870 while (iIdx < kiPartitionCnt) {
38623871 pCtx->pSliceThreading->pThreadPEncCtx[iIdx].pFrameBsInfo = pFbi;
@@ -3925,6 +3934,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 62 unmodified lines
39253934 pLayerBsInfo->uiQualityId = 0;
39263935 pLayerBsInfo->iNalCount = iNalIdxInLayer;
39273936 pLayerBsInfo->eFrameType = eFrameType;
3937+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
39283938 }
39293939 }
39303940
@@ -4103,6 +4113,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 172 unmodified lines
41034113 pLayerBsInfo->iNalCount = 1;
41044114 pLayerBsInfo->pNalLengthInByte[0] = iPaddingNalSize;
41054115 pLayerBsInfo->eFrameType = eFrameType;
4116+ pLayerBsInfo->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
41064117 ++ pLayerBsInfo;
41074118 ++ pCtx->pOut->iLayerBsIndex;
41084119 pLayerBsInfo->pBsBuf = pCtx->pFrameBs + pCtx->iPosBsBuffer;
@@ -4187,17 +4198,14 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 78 unmodified lines
41874198
41884199
41894200 pFbi->iLayerNum = iLayerNum;
4190− pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
41914201
4192− WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsEncoderEncodeExt() OutputInfo iLayerNum = %d,iSubSeqId = %d,iFrameSize = %d",
4193− iLayerNum,
4194− pFbi->iSubSeqId, iFrameSize);
4202+ WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsEncoderEncodeExt() OutputInfo iLayerNum = %d,iFrameSize = %d",
4203+ iLayerNum,iFrameSize);
41954204 for (int32_t i = 0; i < iLayerNum; i++)
41964205 WelsLog (pLogCtx, WELS_LOG_DEBUG,
4197− "WelsEncoderEncodeExt() OutputInfo iLayerId = %d,iNalType = %d,iNalCount = %d, first Nal Length=%d,uiSpatialId = %d,uiTemporalId = %d",
4198− i,
4206+ "WelsEncoderEncodeExt() OutputInfo iLayerId = %d,iNalType = %d,iNalCount = %d, first Nal Length=%d,uiSpatialId = %d,uiTemporalId = %d,iSubSeqId = %d",i,
41994207 pFbi->sLayerInfo[i].uiLayerType, pFbi->sLayerInfo[i].iNalCount, pFbi->sLayerInfo[i].pNalLengthInByte[0],
4200− pFbi->sLayerInfo[i].uiSpatialId, pFbi->sLayerInfo[i].uiTemporalId);
4208+ pFbi->sLayerInfo[i].uiSpatialId, pFbi->sLayerInfo[i].uiTemporalId,pFbi->sLayerInfo[i].iSubSeqId);
42014209 WelsEmms();
42024210
42034211 pLayerBsInfo->eFrameType = eFrameType;

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