MCPcopy Create free account
hub / github.com/cisco/openh264 / WelsEncoderEncodeParameterSets

Function WelsEncoderEncodeParameterSets

codec/encoder/core/src/encoder_ext.cpp:3074–3105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3072}
3073
3074int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) {
3075 if (NULL == pCtx || NULL == pDst) {
3076 return ENC_RETURN_UNEXPECTED;
3077 }
3078
3079 SFrameBSInfo* pFbi = (SFrameBSInfo*)pDst;
3080 SLayerBSInfo* pLayerBsInfo = &pFbi->sLayerInfo[0];
3081 int32_t iCountNal = 0;
3082 int32_t iTotalLength = 0;
3083
3084 pLayerBsInfo->pBsBuf = pCtx->pFrameBs;
3085 pLayerBsInfo->pNalLengthInByte = pCtx->pOut->pNalLen;
3086 InitBits (&pCtx->pOut->sBsWrite, pCtx->pOut->pBsBuffer, pCtx->pOut->uiSize);
3087
3088 pCtx->iPosBsBuffer = 0;
3089 int32_t iReturn = WelsWriteParameterSets (pCtx, &pLayerBsInfo->pNalLengthInByte[0], &iCountNal, &iTotalLength);
3090 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
3091
3092 pLayerBsInfo->uiSpatialId = 0;
3093 pLayerBsInfo->uiTemporalId = 0;
3094 pLayerBsInfo->uiQualityId = 0;
3095 pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER;
3096 pLayerBsInfo->iNalCount = iCountNal;
3097 pLayerBsInfo->eFrameType = videoFrameTypeInvalid;
3098 pLayerBsInfo->iSubSeqId = 0;
3099 //pCtx->eLastNalPriority = NRI_PRI_HIGHEST;
3100 pFbi->iLayerNum = 1;
3101 pFbi->eFrameType = videoFrameTypeInvalid;
3102 WelsEmms();
3103
3104 return ENC_RETURN_SUCCESS;
3105}
3106
3107int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) {
3108 int32_t iSubSeqId = 0;

Callers 1

EncodeParameterSetsMethod · 0.85

Calls 2

InitBitsFunction · 0.85
WelsWriteParameterSetsFunction · 0.85

Tested by

no test coverage detected