History

add iSubSeqId calculation

ruil2 committed 12 years ago

Commit 057e3861 parent e4220b71 file · +17 −1Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+17−1
@@ -2899,6 +2899,22 @@ int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) { · 2898 unmodified lines
28992899 return ENC_RETURN_SUCCESS;
29002900 }
29012901
2902+int32_t GetSubSequenceId(sWelsEncCtx* pCtx,EVideoFrameType eFrameType){
2903+ int32_t iSubSeqId = 0;
2904+ if(eFrameType == videoFrameTypeIDR )
2905+ iSubSeqId = 0;
2906+ else if(eFrameType == videoFrameTypeI)
2907+ iSubSeqId = 1;
2908+ else if (eFrameType == videoFrameTypeP){
2909+ if(pCtx->bCurFrameMarkedAsSceneLtr)
2910+ iSubSeqId = 2;
2911+ else
2912+ iSubSeqId = 3 + pCtx->uiTemporalId; //T0:3 T1:4 T2:5 T3:6
2913+ }
2914+ else
2915+ iSubSeqId = 3 + MAX_TEMPORAL_LAYER_NUM;
2916+ return iSubSeqId;
2917+}
29022918 /*!
29032919 * \brief core svc encoding process
29042920 *
@@ -3540,7 +3556,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 635 unmodified lines
35403556 ++ pCtx->iCodingIndex;
35413557 pCtx->eLastNalPriority = eNalRefIdc;
35423558 pFbi->iLayerNum = iLayerNum;
3543−
3559+ pFbi->iSubSeqId = GetSubSequenceId(pCtx,eFrameType);
35443560 WelsEmms();
35453561
35463562 pFbi->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