Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2899,6 +2899,22 @@ int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) { · 2898 unmodified lines | |||
| 2899 | return ENC_RETURN_SUCCESS; | 2899 | return ENC_RETURN_SUCCESS; |
| 2900 | } | 2900 | } |
| 2901 | 2901 | ||
| 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 | } | ||
| 2902 | /*! | 2918 | /*! |
| 2903 | * \brief core svc encoding process | 2919 | * \brief core svc encoding process |
| 2904 | * | 2920 | * |
| @@ -3540,7 +3556,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 635 unmodified lines | |||
| 3540 | ++ pCtx->iCodingIndex; | 3556 | ++ pCtx->iCodingIndex; |
| 3541 | pCtx->eLastNalPriority = eNalRefIdc; | 3557 | pCtx->eLastNalPriority = eNalRefIdc; |
| 3542 | pFbi->iLayerNum = iLayerNum; | 3558 | pFbi->iLayerNum = iLayerNum; |
| 3543 | 3559 | pFbi->iSubSeqId = GetSubSequenceId(pCtx,eFrameType); | |
| 3544 | WelsEmms(); | 3560 | WelsEmms(); |
| 3545 | 3561 | ||
| 3546 | pFbi->eFrameType = eFrameType; | 3562 | pFbi->eFrameType = eFrameType; |